diff --git a/public/app/features/alerting/alert_def.ts b/public/app/features/alerting/alert_def.ts index 894f3cb5cbe..6d8c24125cf 100644 --- a/public/app/features/alerting/alert_def.ts +++ b/public/app/features/alerting/alert_def.ts @@ -9,7 +9,7 @@ import { var alertQueryDef = new QueryPartDef({ type: 'query', 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: "to", type: "string", options: ['now']}, ], diff --git a/public/app/features/alerting/alert_tab_ctrl.ts b/public/app/features/alerting/alert_tab_ctrl.ts index b524eb0b6fb..2f222802438 100644 --- a/public/app/features/alerting/alert_tab_ctrl.ts +++ b/public/app/features/alerting/alert_tab_ctrl.ts @@ -215,6 +215,16 @@ export class AlertTabCtrl { case "get-part-actions": { 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); + } } }