From a4701c88ac2dfd3f639648fc083d1f1014103b70 Mon Sep 17 00:00:00 2001 From: Brian McMichael Date: Tue, 20 Dec 2016 09:53:58 -0500 Subject: [PATCH] update string manipulation to use URI.js --- app/assets/javascripts/clusters.js.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/clusters.js.coffee b/app/assets/javascripts/clusters.js.coffee index c2aa89a2..4de54287 100644 --- a/app/assets/javascripts/clusters.js.coffee +++ b/app/assets/javascripts/clusters.js.coffee @@ -5,9 +5,7 @@ # Change the src of the given image with an updated timestamp to get the latest version # @param node - DOM image tag object of the Ganglia image to update startRefresh = (node) -> - if node.src.indexOf('timestamp=') > -1 - node.src = node.src.split('timestamp=')[0] + 'timestamp=' + (new Date).getTime() - return + node.src = URL(node.src).setQuery("timestamp", (new Date).getTime()).toString() # anonymous function to update all visible Ganglia graphs every 5 seconds (refreshImages = ->