mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Handle invalid query in graph UI (#2652)
This commit is contained in:
parent
8b8ba26129
commit
9eb1a5d6bf
File diff suppressed because one or more lines are too long
|
@ -415,7 +415,7 @@ Prometheus.Graph.prototype.submitQuery = function() {
|
|||
return;
|
||||
}
|
||||
var duration = new Date().getTime() - startTime;
|
||||
var totalTimeSeries = xhr.responseJSON.data.result.length;
|
||||
var totalTimeSeries = (xhr.responseJSON.data !== undefined) ? xhr.responseJSON.data.result.length : 0;
|
||||
self.evalStats.html("Load time: " + duration + "ms <br /> Resolution: " + resolution + "s <br />" + "Total time series: " + totalTimeSeries);
|
||||
self.spinner.hide();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue