소스 검색

Merge branch 'alerting' of github.com:grafana/grafana into alerting

Torkel Ödegaard 9 년 전
부모
커밋
2f953d75a6
2개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      public/app/features/alerting/alert_def.ts
  2. 10 0
      public/app/features/alerting/alert_tab_ctrl.ts

+ 1 - 1
public/app/features/alerting/alert_def.ts

@@ -9,7 +9,7 @@ import {
 var alertQueryDef = new QueryPartDef({
 var alertQueryDef = new QueryPartDef({
   type: 'query',
   type: 'query',
   params: [
   params: [
-    {name: "queryRefId", type: 'string', options: ['A', 'B', 'C', 'D', 'E', 'F']},
+    {name: "queryRefId", type: 'string', dynamicLookup: true},
     {name: "from", type: "string", options: ['1s', '10s', '1m', '5m', '10m', '15m', '1h']},
     {name: "from", type: "string", options: ['1s', '10s', '1m', '5m', '10m', '15m', '1h']},
     {name: "to", type: "string", options: ['now']},
     {name: "to", type: "string", options: ['now']},
   ],
   ],

+ 10 - 0
public/app/features/alerting/alert_tab_ctrl.ts

@@ -215,6 +215,16 @@ export class AlertTabCtrl {
       case "get-part-actions": {
       case "get-part-actions": {
         return this.$q.when([]);
         return this.$q.when([]);
       }
       }
+      case "part-param-changed": {
+        this.validateModel();
+      }
+      case "get-param-options": {
+        var result = this.panel.targets.map(target => {
+          return this.uiSegmentSrv.newSegment({ value: target.refId });
+        });
+
+        return this.$q.when(result);
+      }
     }
     }
   }
   }