mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
ui: don’t consider aborted requests complete
If an existing request is aborted due to a new request, ignore the completion of the initial request. Example: 1. Chrome dev tools: enable 5 second network latency 2. Execute query 3. A second later, execute the query again 4. Currently, the spinner will hide, and the stats will immediately display, as if the request had completed. Instead, the spinner and stats should wait until the 2nd execution finishes.
This commit is contained in:
parent
c1ae61a2cc
commit
223a22457f
File diff suppressed because one or more lines are too long
|
@ -364,7 +364,10 @@ Prometheus.Graph.prototype.submitQuery = function() {
|
|||
self.showError("Error executing query: " + err);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
complete: function(xhr, resp) {
|
||||
if (resp == "abort") {
|
||||
return;
|
||||
}
|
||||
var duration = new Date().getTime() - startTime;
|
||||
self.evalStats.html("Load time: " + duration + "ms <br /> Resolution: " + resolution + "s");
|
||||
self.spinner.hide();
|
||||
|
|
Loading…
Reference in a new issue