Skip to content

Commit

Permalink
Fix auto refresh gui inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jun 15, 2015
1 parent 4516292 commit 913bf68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions htdocs/frontend/javascripts/functions.js
Expand Up @@ -187,7 +187,7 @@ vz.parseUrlParams = function() {

case 'from':
case 'to':
// disabled automatic refresh
// disable automatic refresh
vz.options.refresh = false;
// ms or speaking timestamp
var ts = (/^-?[0-9]+$/.test(vars[key])) ? parseInt(vars[key]) : new Date(vars[key]).getTime();
Expand All @@ -201,7 +201,7 @@ vz.parseUrlParams = function() {
vz.options[key] = vars[key];
break;

case 'options':
case 'options': // data load options
vz.options.options = vars[key];
break;
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/frontend/javascripts/options.js
Expand Up @@ -28,7 +28,7 @@ vz.options = {
language: 'de',
precision: 2, // TODO update from middleware capabilities?
tuples: null, // automatically determined by plot size
refresh: false,
refresh: true, // update chart if zoomed to current timestamp
totalsInterval: 300, // update interval for consumption is retrieved for each channel where initialconsumption > 0
shortenLongTypes: false, // show shorter type names in table
minTimeout: 2000, // minimum refresh time in ms
Expand Down
2 changes: 1 addition & 1 deletion htdocs/frontend/javascripts/wui.js
Expand Up @@ -96,8 +96,8 @@ vz.wui.init = function() {
$('#controls').buttonset();

// auto refresh
$('#refresh').prop('checked', vz.options.refresh);
if (vz.options.refresh) {
$('#refresh').prop('checked', true);
vz.wui.tmaxnow = true;
vz.wui.setTimeout();
}
Expand Down

0 comments on commit 913bf68

Please sign in to comment.