From e2b75891c4e3b95389d6fe24de7af3547a7ecc31 Mon Sep 17 00:00:00 2001 From: Max Kalika Date: Fri, 29 Jan 2016 23:18:02 -0800 Subject: [PATCH] Issue #85: Fix web ui graph refresh period based on new config api that returns milliseconds for durations. --- src/main/resources/assets/js/jmxproxy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/assets/js/jmxproxy.js b/src/main/resources/assets/js/jmxproxy.js index eab8772..f10fe50 100644 --- a/src/main/resources/assets/js/jmxproxy.js +++ b/src/main/resources/assets/js/jmxproxy.js @@ -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); } @@ -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() { @@ -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();