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("/") @app.route("/")
def index(): 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") @app.route("/_logs")
def logs(): def logs():

View File

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

View File

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