Commit 37895830 by bergquist

for: use 0m as default for existing alerts and 5m for new

parent ae2d5367
...@@ -169,7 +169,7 @@ export class AlertTabCtrl { ...@@ -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 { ...@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment