From 825f9f01e0f1c022438b73b0f3a1c487bc93db15 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 11 Sep 2017 15:05:12 +0200 Subject: [PATCH] Added refresh rate in configuration file --- server.py | 4 +++- static/js/index.js | 2 +- templates/index.html | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index c2f20ce..bea1960 100755 --- a/server.py +++ b/server.py @@ -91,7 +91,9 @@ class EventMessage(): @app.route("/") def index(): - return render_template('index.html') + return render_template('index.html', + graph_log_refresh_rate=cfg.getint('Dashboard' ,'graph_log_refresh_rate') + ) @app.route("/_logs") def logs(): diff --git a/static/js/index.js b/static/js/index.js index 27321eb..a9276d0 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,5 +1,5 @@ //color: #5f6062 -var updateInterval = 1000; // 1s +var updateInterval = 1000*graph_log_refresh_rate; // 1s var numPoint = 60; var emptyArray = []; diff --git a/templates/index.html b/templates/index.html index fc487c3..a0922dc 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,7 +33,7 @@ -
+
@@ -125,8 +125,11 @@