Jelajahi Sumber

prevent refresh on fixed time window

Jiang Ye 7 tahun lalu
induk
melakukan
4c4e5533a1
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      public/app/features/dashboard/time_srv.ts

+ 5 - 0
public/app/features/dashboard/time_srv.ts

@@ -85,6 +85,11 @@ export class TimeSrv {
     if (params.to) {
       this.time.to = this.parseUrlParam(params.to) || this.time.to;
     }
+    // if absolute ignore refresh option saved to dashboard
+    if (params.to && params.to.indexOf('now') === -1) {
+      this.refresh = false;
+    }
+    // but if refresh explicitly set then use that
     if (params.refresh) {
       this.refresh = params.refresh || this.refresh;
     }