Fixed a flexibility issue

This commit is contained in:
Mokaddem 2016-07-15 09:47:00 +02:00
parent 2383db022f
commit 4ecb9a4b44
2 changed files with 4 additions and 2 deletions

View file

@ -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 } ] }},

View file

@ -19,6 +19,7 @@
<script src="{{ url_for('static', filename='js/jquery.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.flot.js') }}"></script>
<script>
window.default_minute = {{ default_minute }};
function update_values() {
$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
$.getJSON($SCRIPT_ROOT+"/_stuff",