Skip to content

Commit

Permalink
Issue #85: Fix web ui graph refresh period based on new config api th…
Browse files Browse the repository at this point in the history
…at returns milliseconds for durations.
  • Loading branch information
mk23 committed Jan 30, 2016
1 parent 4adc2a1 commit e2b7589
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/assets/js/jmxproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ var endpointHostClass = function(prefix, host) {

loadHistory = function(item, data, prop) {
mapped = _.map(data, function(v, k) {
return [ts - k * jmxproxyConf.cache_duration * 60 * 1000, _.has(v, prop) ? v[prop] : v];
return [ts - k * jmxproxyConf.cache_duration, _.has(v, prop) ? v[prop] : v];
}).reverse();
return _.isUndefined(item) ? mapped : item.concat(mapped);
}
Expand Down Expand Up @@ -737,7 +737,7 @@ var endpointHostClass = function(prefix, host) {
refreshGraphs('overview-thr-gr', true);
});

setTimeout(function() { gatherObjects(1); }, jmxproxyConf.cache_duration * 60 * 1000);
setTimeout(function() { gatherObjects(1); }, jmxproxyConf.cache_duration);
};

var fetchName = function() {
Expand All @@ -754,7 +754,7 @@ var endpointHostClass = function(prefix, host) {

var fetchData = function(item, callback) {
if (creds != null) {
$.post(prefix+'/jmxproxy/'+host+item, creds, callback, 'json')
$.post(prefix+'/jmxproxy/'+host+item, creds, callback)
.fail(function(jqXHR) {
if (jqXHR.status == 401) {
$('#endpoint-auth').modal();
Expand Down

0 comments on commit e2b7589

Please sign in to comment.