From f170720f61b61a863118591f26d9d86b21ebb56e Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Thu, 21 Mar 2013 17:36:04 +0100 Subject: [PATCH] Use hidden input for end. Instead of appending to url manually. --- web/static/graph.html | 1 + web/static/js/graph.js | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/static/graph.html b/web/static/graph.html index b0a99c8ec..46360e674 100644 --- a/web/static/graph.html +++ b/web/static/graph.html @@ -45,6 +45,7 @@ + diff --git a/web/static/js/graph.js b/web/static/js/graph.js index 5f5329937..44ce58934 100644 --- a/web/static/js/graph.js +++ b/web/static/js/graph.js @@ -243,17 +243,14 @@ Prometheus.Graph.prototype.submitQuery = function() { self.queryForm.find("input[name=range]").val(rangeSeconds); var resolution = self.queryForm.find("input[name=step_input]").val() || Math.max(Math.floor(rangeSeconds / 250), 1); self.queryForm.find("input[name=step]").val(resolution); + var endDate = self.getEndDate() / 1000; + self.queryForm.find("input[name=end]").val(endDate); - var data = self.queryForm.serialize(); - var endDate = self.getEndDate() - if (endDate) { - data = data + "&end=" + endDate/1000 - } $.ajax({ method: self.queryForm.attr("method"), url: self.queryForm.attr("action"), dataType: "json", - data: data, + data: self.queryForm.serialize(), success: function(json, textStatus) { if (json.Type == "error") { alert(json.Value);