diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md index 560d68554e3..ce359db0fd2 100644 --- a/docs/sources/administration/provisioning.md +++ b/docs/sources/administration/provisioning.md @@ -453,9 +453,9 @@ The following sections detail the supported settings and secure settings for eac #### Alert notification `LINE` -| Name | -| ----- | -| token | +| Name | Secure setting | +| ----- | - | +| token | yes | #### Alert notification `pagerduty` diff --git a/pkg/services/alerting/notifiers/line.go b/pkg/services/alerting/notifiers/line.go index e4688c8a6af..f61c9d605ea 100644 --- a/pkg/services/alerting/notifiers/line.go +++ b/pkg/services/alerting/notifiers/line.go @@ -18,13 +18,23 @@ func init() { Heading: "LINE notify settings", Factory: NewLINENotifier, OptionsTemplate: ` -
-

LINE notify settings

-
- Token - -
-
+

LINE notify settings

+
+ +
+ + +
+
+ + reset +
+
`, Options: []alerting.NotifierOption{ { @@ -44,7 +54,7 @@ const ( // NewLINENotifier is the constructor for the LINE notifier func NewLINENotifier(model *models.AlertNotification) (alerting.Notifier, error) { - token := model.Settings.Get("token").MustString() + token := model.DecryptedValue("token", model.Settings.Get("token").MustString()) if token == "" { return nil, alerting.ValidationError{Reason: "Could not find token in settings"} }