From 72bd75185703a7cbb8b826b5cfebccaca7788502 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Thu, 21 Mar 2013 17:47:40 +0100 Subject: [PATCH] Increase/decrease end date by 1/2 range. --- web/static/js/graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/static/js/graph.js b/web/static/js/graph.js index e59e64808..282139d37 100644 --- a/web/static/js/graph.js +++ b/web/static/js/graph.js @@ -222,13 +222,13 @@ Prometheus.Graph.prototype.setEndDate = function(date) { Prometheus.Graph.prototype.increaseEnd = function() { var self = this; - self.setEndDate(new Date(self.getOrSetEndDate() + self.parseRange(self.rangeInput.val()) * 1000)) + self.setEndDate(new Date(self.getOrSetEndDate() + self.parseRange(self.rangeInput.val()) * 1000/2 )) // increase by 1/2 range & convert ms in s self.submitQuery(); }; Prometheus.Graph.prototype.decreaseEnd = function() { var self = this; - self.setEndDate(new Date(self.getOrSetEndDate() - self.parseRange(self.rangeInput.val()) * 1000)) + self.setEndDate(new Date(self.getOrSetEndDate() - self.parseRange(self.rangeInput.val()) * 1000/2 )) self.submitQuery(); };