فهرست منبع

fix(alertlist): remove timerange checkbox option

bergquist 9 سال پیش
والد
کامیت
0bde2ae689
2فایلهای تغییر یافته به همراه5 افزوده شده و 15 حذف شده
  1. 2 9
      public/app/plugins/panel/alertlist/editor.html
  2. 3 6
      public/app/plugins/panel/alertlist/module.ts

+ 2 - 9
public/app/plugins/panel/alertlist/editor.html

@@ -22,15 +22,8 @@
   </div>
 
   <div class="section gf-form-group" ng-if="ctrl.panel.show == 'changes'">
-    <h5 class="section-heading">Time options</h5>
-    <gf-form-switch
-      class="gf-form"
-      label="Within time range"
-      label-class="width-11"
-      tooltip="Show alert changes within the dashboard time range"
-      checked="ctrl.panel.useTimeRange"
-      on-change="ctrl.onRender()"></gf-form-switch>
-  </div>
+    <!-- <h5 class="section-heading">Current state</h5> -->
+	</div>
 
   <div class="section gf-form-group" ng-if="ctrl.panel.show == 'current'">
     <!-- <h5 class="section-heading">Current state</h5> -->

+ 3 - 6
public/app/plugins/panel/alertlist/module.ts

@@ -24,8 +24,7 @@ class AlertListPanel extends PanelCtrl {
   panelDefaults = {
     show: 'current',
     limit: 10,
-    stateFilter: [],
-    useTimeRange: false
+    stateFilter: []
   };
 
   /** @ngInject */
@@ -72,10 +71,8 @@ class AlertListPanel extends PanelCtrl {
       newState: this.panel.stateFilter
     };
 
-    if (this.panel.useTimeRange) {
-      params.from = dateMath.parse(this.dashboard.time.from).unix() * 1000;
-      params.to = dateMath.parse(this.dashboard.time.to).unix() * 1000;
-    }
+    params.from = dateMath.parse(this.dashboard.time.from).unix() * 1000;
+    params.to = dateMath.parse(this.dashboard.time.to).unix() * 1000;
 
     this.backendSrv.get(`/api/annotations`, params)
       .then(res => {