From 4ac448e71eea8cc4a5c527cbdc90852b69b09a95 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Tue, 12 Jul 2016 10:02:01 +0200 Subject: [PATCH] restored working search>html + Added max curves display to all graphs. --- var/www/Flask_server.py | 6 +- var/www/static/js/plot-graph.js | 2 +- var/www/templates/Protocolstrending.html | 48 +++++++++- var/www/templates/Trending.html | 27 +++--- var/www/templates/Wordstrending.html | 42 ++++++++- var/www/templates/search.html | 114 +++++++++++++++++++---- var/www/templates/searchbox.html | 2 +- 7 files changed, 201 insertions(+), 40 deletions(-) diff --git a/var/www/Flask_server.py b/var/www/Flask_server.py index 6ffe25fc..018608f1 100755 --- a/var/www/Flask_server.py +++ b/var/www/Flask_server.py @@ -133,12 +133,14 @@ def monitoring(): @app.route("/wordstrending/") def wordstrending(): - return render_template("Wordstrending.html") + default_display = cfg.get("Flask", "default_display") + return render_template("Wordstrending.html", default_display = default_display) @app.route("/protocolstrending/") def protocolstrending(): - return render_template("Protocolstrending.html") + default_display = cfg.get("Flask", "default_display") + return render_template("Protocolstrending.html", default_display = default_display) @app.route("/trending/") diff --git a/var/www/static/js/plot-graph.js b/var/www/static/js/plot-graph.js index fc586adf..6daad3ba 100644 --- a/var/www/static/js/plot-graph.js +++ b/var/www/static/js/plot-graph.js @@ -115,7 +115,7 @@ function Graph(id_pannel, path, header_size){ headings = this.graph.getLabels(); headings.splice(0,1); var sorted_list = new Array(); - today = new Date().getDate(); + today = new Date().getDate()-1; // Take the top from yesterday so that we can see the current evolution for( i=0; i - + +
@@ -81,6 +85,14 @@
+ +
+ + + + +
+
@@ -97,12 +109,40 @@ - + + + +
diff --git a/var/www/templates/Trending.html b/var/www/templates/Trending.html index ddb31ac6..dca69e51 100644 --- a/var/www/templates/Trending.html +++ b/var/www/templates/Trending.html @@ -95,12 +95,11 @@ -
- - - - + + + +
@@ -116,14 +115,6 @@
Top Domain Trending - -
- - - - -
-
+ +
+ + + + +
+
@@ -186,7 +185,7 @@ create_and_plot("TldsTrending", '../static//csv/tldstrendingdata.csv') }); - function myScript(new_display){ + function take_top(new_display){ current_displayed_graph.set_Visibility_andHide(new_display, default_display); default_display = new_display; } diff --git a/var/www/templates/Wordstrending.html b/var/www/templates/Wordstrending.html index 23158a59..22603b07 100644 --- a/var/www/templates/Wordstrending.html +++ b/var/www/templates/Wordstrending.html @@ -16,8 +16,12 @@ - + +
@@ -81,6 +85,14 @@
+ +
+ + + + +
+
@@ -97,10 +109,36 @@ + + diff --git a/var/www/templates/search.html b/var/www/templates/search.html index b9b7caeb..0117e52f 100644 --- a/var/www/templates/search.html +++ b/var/www/templates/search.html @@ -12,10 +12,14 @@ + + + + @@ -34,7 +45,7 @@