mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
for: use 0m as default for existing alerts and 5m for new
This commit is contained in:
parent
ae2d536740
commit
3789583014
@ -169,7 +169,7 @@ export class AlertTabCtrl {
|
|||||||
alert.frequency = alert.frequency || '1m';
|
alert.frequency = alert.frequency || '1m';
|
||||||
alert.handler = alert.handler || 1;
|
alert.handler = alert.handler || 1;
|
||||||
alert.notifications = alert.notifications || [];
|
alert.notifications = alert.notifications || [];
|
||||||
alert.for = alert.for || '5m';
|
alert.for = alert.for || '0m';
|
||||||
|
|
||||||
const defaultName = this.panel.title + ' alert';
|
const defaultName = this.panel.title + ' alert';
|
||||||
alert.name = alert.name || defaultName;
|
alert.name = alert.name || defaultName;
|
||||||
@ -355,6 +355,7 @@ export class AlertTabCtrl {
|
|||||||
enable() {
|
enable() {
|
||||||
this.panel.alert = {};
|
this.panel.alert = {};
|
||||||
this.initModel();
|
this.initModel();
|
||||||
|
this.panel.alert.for = '5m'; //default value for new alerts. for existing alerts we use 0m to avoid breaking changes
|
||||||
}
|
}
|
||||||
|
|
||||||
evaluatorParamsChanged() {
|
evaluatorParamsChanged() {
|
||||||
|
Loading…
Reference in New Issue
Block a user