mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): adds default checkbox to ui
This commit is contained in:
@@ -155,15 +155,18 @@ func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
alertNotification := &m.AlertNotification{}
|
alertNotification := &m.AlertNotification{
|
||||||
alertNotification.Id = cmd.Id
|
Id: cmd.Id,
|
||||||
alertNotification.OrgId = cmd.OrgID
|
OrgId: cmd.OrgID,
|
||||||
alertNotification.Name = cmd.Name
|
Name: cmd.Name,
|
||||||
alertNotification.Type = cmd.Type
|
Type: cmd.Type,
|
||||||
alertNotification.Settings = cmd.Settings
|
Settings: cmd.Settings,
|
||||||
alertNotification.Updated = time.Now()
|
Updated: time.Now(),
|
||||||
alertNotification.Created = current.Created
|
Created: current.Created,
|
||||||
alertNotification.AlwaysExecute = cmd.AlwaysExecute
|
AlwaysExecute: cmd.AlwaysExecute,
|
||||||
|
}
|
||||||
|
|
||||||
|
sess.UseBool("always_execute")
|
||||||
|
|
||||||
var affected int64
|
var affected int64
|
||||||
affected, err = sess.Id(alertNotification.Id).Update(alertNotification)
|
affected, err = sess.Id(alertNotification.Id).Update(alertNotification)
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="gf-form">
|
||||||
|
<gf-form-switch class="gf-form" label-class="width-8" label="Always execute" checked="ctrl.notification.alwaysExecute" on-change=""></gf-form-switch>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gf-form-group section" ng-show="ctrl.notification.type === 'webhook'">
|
<div class="gf-form-group section" ng-show="ctrl.notification.type === 'webhook'">
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
|
|||||||
Reference in New Issue
Block a user