mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Increase/decrease end date by 1/2 range.
This commit is contained in:
parent
c0b5ba6512
commit
72bd751857
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue