From 4ecb9a4b443472e6247f31092b08fe411a976ce2 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Fri, 15 Jul 2016 09:47:00 +0200 Subject: [PATCH] Fixed a flexibility issue --- var/www/static/js/indexjavascript.js | 5 +++-- var/www/templates/index.html | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/var/www/static/js/indexjavascript.js b/var/www/static/js/indexjavascript.js index 628ffe86..cef3bf41 100644 --- a/var/www/static/js/indexjavascript.js +++ b/var/www/static/js/indexjavascript.js @@ -1,7 +1,8 @@ // Plot and update the number of processed pastes $(function() { var data = []; - var totalPoints = 60*10; //60s*10m + var default_minute = (typeof window.default_minute !== "undefined") ? parseInt(window.default_minute) : 10; + var totalPoints = 60*parseInt(default_minute); //60s*minute var curr_max = 0; function getData() { @@ -24,7 +25,7 @@ $(function() { return res; } - var updateInterval = 1000; + var updateInterval = 1000; //1s var options = { series: { shadowSize: 1 }, lines: { fill: true, fillColor: { colors: [ { opacity: 1 }, { opacity: 0.1 } ] }}, diff --git a/var/www/templates/index.html b/var/www/templates/index.html index dc81cfe3..99c84941 100644 --- a/var/www/templates/index.html +++ b/var/www/templates/index.html @@ -19,6 +19,7 @@