Added refresh rate in configuration file

pull/18/head
= 2017-09-11 15:05:12 +02:00
parent 0a172be26c
commit 825f9f01e0
3 changed files with 8 additions and 3 deletions

View File

@ -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():

View File

@ -1,5 +1,5 @@
//color: #5f6062
var updateInterval = 1000; // 1s
var updateInterval = 1000*graph_log_refresh_rate; // 1s
var numPoint = 60;
var emptyArray = [];

View File

@ -33,7 +33,7 @@
</nav>
<!-- Page Content -->
<div id="page-wrapper">
<div id="page-wrapper" style="margin: 0px;">
<div class="container-fluid">
<div class="row">
<div class="col-lg-6">
@ -125,8 +125,11 @@
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<!-- Index -->
<script>
/* URL */
var urlForLogs = "{{ url_for('logs') }}";
var urlForHead = "{{ url_for('getLogHead') }}";
/* DATA */
var graph_log_refresh_rate = {{ graph_log_refresh_rate }};
</script>
<script src="{{ url_for('static', filename='js/index.js') }}"></script>