mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): only show available queries in alert query
This commit is contained in:
parent
9b5a7b5ef6
commit
631acc2bf9
@ -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']},
|
||||||
],
|
],
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user