mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
chg: [Tracker] add more info
This commit is contained in:
parent
a42676fbce
commit
fb35be77f4
3 changed files with 7 additions and 6 deletions
|
@ -16,6 +16,7 @@ from textblob import TextBlob
|
||||||
|
|
||||||
sys.path.append(os.path.join(os.environ['AIL_FLASK'], 'modules'))
|
sys.path.append(os.path.join(os.environ['AIL_FLASK'], 'modules'))
|
||||||
import Flask_config
|
import Flask_config
|
||||||
|
from flask import escape
|
||||||
|
|
||||||
import Date
|
import Date
|
||||||
import Item
|
import Item
|
||||||
|
@ -244,11 +245,11 @@ def add_tracked_term(term , term_type, user_id, level, tags, mails, dashboard=0)
|
||||||
|
|
||||||
# create term tags list
|
# create term tags list
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
r_serv_term.sadd('tracker:tags:{}'.format(term_uuid), tag)
|
r_serv_term.sadd('tracker:tags:{}'.format(term_uuid), escape(tag) )
|
||||||
|
|
||||||
# create term tags mail notification list
|
# create term tags mail notification list
|
||||||
for mail in mails:
|
for mail in mails:
|
||||||
r_serv_term.sadd('tracker:mail:{}'.format(term_uuid), mail)
|
r_serv_term.sadd('tracker:mail:{}'.format(term_uuid), escape(mail) )
|
||||||
|
|
||||||
# toggle refresh module tracker list/set
|
# toggle refresh module tracker list/set
|
||||||
r_serv_term.set('tracker:refresh:{}'.format(term_type), time.time())
|
r_serv_term.set('tracker:refresh:{}'.format(term_type), time.time())
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
<script>
|
<script>
|
||||||
var chart = {};
|
var chart = {};
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#page-Crawler").addClass("active");
|
$("#page-Tracker").addClass("active");
|
||||||
$("#nav_manual_crawler").addClass("active");
|
$("#nav_manual_crawler").addClass("active");
|
||||||
$("#tracker_desc").hide();
|
$("#tracker_desc").hide();
|
||||||
$("#term").hide();
|
$("#term").hide();
|
||||||
|
@ -117,12 +117,12 @@ $(document).ready(function(){
|
||||||
$('#tracker_type').on('change', function() {
|
$('#tracker_type').on('change', function() {
|
||||||
var tracker_type = this.value;
|
var tracker_type = this.value;
|
||||||
if (tracker_type=="word") {
|
if (tracker_type=="word") {
|
||||||
$("#tracker_desc").text("Term to track:");
|
$("#tracker_desc").text("Token to track. You need to use a regex if you want to use one of the following special characters [<>~!?@#$%^&*|()_-+={}\":;,.\'\n\r\t]/\\ ");
|
||||||
$("#tracker_desc").show();
|
$("#tracker_desc").show();
|
||||||
$("#term").show();
|
$("#term").show();
|
||||||
$("#nb_word").hide();
|
$("#nb_word").hide();
|
||||||
} else if (tracker_type=="set") {
|
} else if (tracker_type=="set") {
|
||||||
$("#tracker_desc").text("Terms to track (space separated). Select the numbers of different tokens to trigger this tracker");
|
$("#tracker_desc").text("Set of Terms to track (space separated). This tracker is used to check if an item contain one or more terms specified in a set. If an item contain NB unique terms (by default NB of unique keywords = 1), this tracker is triggered. You need to use a regex if you want to use one of the following special characters [<>~!?@#$%^&*|()_-+={}\":;,.\'\n\r\t]/\\ ");
|
||||||
$("#tracker_desc").show();
|
$("#tracker_desc").show();
|
||||||
$("#term").show();
|
$("#term").show();
|
||||||
$("#nb_word").show();
|
$("#nb_word").show();
|
||||||
|
|
|
@ -256,7 +256,7 @@ $(document).ready(function(){
|
||||||
$('#myTable_').DataTable({
|
$('#myTable_').DataTable({
|
||||||
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
|
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
|
||||||
"iDisplayLength": 10,
|
"iDisplayLength": 10,
|
||||||
"order": [[ 0, "desc" ]]
|
"order": [[ 0, "asc" ]]
|
||||||
});
|
});
|
||||||
|
|
||||||
sparkline("sparkline", {{ tracker_metadata['sparkline'] }}, {});
|
sparkline("sparkline", {{ tracker_metadata['sparkline'] }}, {});
|
||||||
|
|
Loading…
Reference in a new issue