mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Fix context for the showWarning function (#5833)
* Fix context for the showWarning function If the difference between the current time on a client and time on a server is quite big, Prometheus tries to show a related warning in UI on the Graph tab. But in the code, an incorrect context is used to invoke this method. As a result, an error is showed in the web developer console and the whole page stop working at all. This commit fixes the context. CC @juliusv Signed-off-by: Vyacheslav Kulakov <vkulakov@swiftserve.com> * Fix context for the showWarning function Fixed assets CC @juliusv Signed-off-by: Vyacheslav Kulakov <vkulakov@swiftserve.com>
This commit is contained in:
parent
a3487fc74c
commit
5e974d3170
File diff suppressed because one or more lines are too long
|
@ -246,7 +246,7 @@ Prometheus.Graph.prototype.checkTimeDrift = function() {
|
|||
var diff = Math.abs(browserTime - serverTime);
|
||||
|
||||
if (diff >= 30) {
|
||||
this.showWarning(
|
||||
self.showWarning(
|
||||
"<div class=\"alert alert-warning\"><strong>Warning!</strong> Detected " +
|
||||
diff.toFixed(2) +
|
||||
" seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results.</div>"
|
||||
|
|
Loading…
Reference in a new issue