Skip to content

Commit

Permalink
update string manipulation to use URI.js
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmcmichael committed Dec 20, 2016
1 parent 47a179f commit a4701c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/assets/javascripts/clusters.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ->
Expand Down

0 comments on commit a4701c8

Please sign in to comment.