mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
alerting: bad default state for notifiers
when we made image upload optional we didnt show the default value properly in the UI. Which caused confusing. This commit apply the default values to existing notifiers in the edit pages and reverts back to using uploadimage=true as the default value.
This commit is contained in:
@@ -43,6 +43,7 @@ export class AlertNotificationEditCtrl {
|
||||
return this.backendSrv.get(`/api/alert-notifications/${this.$routeParams.id}`).then(result => {
|
||||
this.navModel.breadcrumbs.push({ text: result.name });
|
||||
this.navModel.node = { text: result.name };
|
||||
result.settings = _.defaults(result.settings, this.defaults.settings);
|
||||
return result;
|
||||
});
|
||||
})
|
||||
@@ -89,7 +90,7 @@ export class AlertNotificationEditCtrl {
|
||||
}
|
||||
|
||||
typeChanged() {
|
||||
this.model.settings = {};
|
||||
this.model.settings = _.defaults({}, this.defaults.settings);
|
||||
this.notifierTemplateId = this.getNotifierTemplateId(this.model.type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user