don't store empty values in the URL

This commit is contained in:
Harmen 2016-07-25 20:58:21 +02:00
parent e980913cd6
commit afc5873b0e
2 changed files with 74 additions and 72 deletions

File diff suppressed because one or more lines are too long

View file

@ -219,7 +219,9 @@ Prometheus.Graph.prototype.getOptions = function() {
self.queryForm.find("input").each(function(index, element) {
var name = element.name;
if ($.inArray(name, optionInputs) >= 0) {
options[name] = element.value;
if (element.value.length > 0) {
options[name] = element.value;
}
}
});
options.expr = self.expr.val();