From 8cd36982b8e56e2dab6a1b7e70f460f317706c77 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Mon, 11 Jul 2016 16:57:45 +0200 Subject: [PATCH] Added a dynamic limit on the number of elements to display. Not fully tested. (recovered old doc, searching not working) --- var/www/Flask_server.py | 3 +- var/www/static/js/plot-graph.js | 11 ++- var/www/templates/Trending.html | 31 ++++++++- var/www/templates/search.html | 114 +++++--------------------------- 4 files changed, 56 insertions(+), 103 deletions(-) diff --git a/var/www/Flask_server.py b/var/www/Flask_server.py index 82e907a7..6ffe25fc 100755 --- a/var/www/Flask_server.py +++ b/var/www/Flask_server.py @@ -143,7 +143,8 @@ def protocolstrending(): @app.route("/trending/") def trending(): - return render_template("Trending.html") + default_display = cfg.get("Flask", "default_display") + return render_template("Trending.html", default_display = default_display) @app.route("/showsavedpaste/") #completely shows the paste in a new tab diff --git a/var/www/static/js/plot-graph.js b/var/www/static/js/plot-graph.js index 4c9ee382..fc586adf 100644 --- a/var/www/static/js/plot-graph.js +++ b/var/www/static/js/plot-graph.js @@ -81,7 +81,8 @@ function Graph(id_pannel, path, header_size){ visibility: false_tab }); this.graph = g2; - this.setVisibility = setVis; + this.set_Visibility = setVis; + this.set_Visibility_andHide = setVis_andHide; onclick = function(ev) { if (g2.isSeriesLocked()) { @@ -124,11 +125,17 @@ function Graph(id_pannel, path, header_size){ }); } - //var no_display_list = sorted_list.slice(10, sorted_list.length+1); var display_list = sorted_list.slice(0, max_display); for( i=0; i + @@ -71,6 +75,7 @@
Top Level Domain Trending +
+
+ +
+ + + +
+
@@ -103,6 +116,14 @@
Top Domain Trending + +
+ + + + +
+
+
@@ -86,35 +74,31 @@
-
- {{ r|length }} Results for "{{ query }}" + {{ r|length }} Results
- +
- - - + {% set i = 0 %} {% for path in r %} + {% set prev_content = c[i] %} - - - - + + {% set i = i + 1 %} {% endfor %} @@ -131,89 +115,23 @@ - +
#PathDateSize (Kb)Path Action
{{ i + 1 }} {{ path }}{{ paste_date[i] }}{{ paste_size[i] }}

{{ path }}