chg: [Tracker] add more info

This commit is contained in:
Terrtia 2019-09-13 11:06:41 +02:00
parent a42676fbce
commit fb35be77f4
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
3 changed files with 7 additions and 6 deletions

View file

@ -16,6 +16,7 @@ from textblob import TextBlob
sys.path.append(os.path.join(os.environ['AIL_FLASK'], 'modules'))
import Flask_config
from flask import escape
import Date
import Item
@ -244,11 +245,11 @@ def add_tracked_term(term , term_type, user_id, level, tags, mails, dashboard=0)
# create term tags list
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
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
r_serv_term.set('tracker:refresh:{}'.format(term_type), time.time())

View file

@ -108,7 +108,7 @@
<script>
var chart = {};
$(document).ready(function(){
$("#page-Crawler").addClass("active");
$("#page-Tracker").addClass("active");
$("#nav_manual_crawler").addClass("active");
$("#tracker_desc").hide();
$("#term").hide();
@ -117,12 +117,12 @@ $(document).ready(function(){
$('#tracker_type').on('change', function() {
var tracker_type = this.value;
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();
$("#term").show();
$("#nb_word").hide();
} 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();
$("#term").show();
$("#nb_word").show();

View file

@ -256,7 +256,7 @@ $(document).ready(function(){
$('#myTable_').DataTable({
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
"iDisplayLength": 10,
"order": [[ 0, "desc" ]]
"order": [[ 0, "asc" ]]
});
sparkline("sparkline", {{ tracker_metadata['sparkline'] }}, {});