mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05:00
Alerting: Fix issue with Slack contact point validation (#47559)
* secureFields and secureSettings * revert channelIndex * readd lost code * use specific return * register secure fields and use not hard coded index * fix for determineReadOnly * fix lint error * fix test suite Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
This commit is contained in:
co-authored by
gillesdemey
parent
e58a015baf
commit
39d3c8afd7
@@ -383,7 +383,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
|
||||
Description: "Specify channel, private group, or IM channel (can be an encoded ID or a name) - required unless you provide a webhook",
|
||||
PropertyName: "recipient",
|
||||
Required: true,
|
||||
DependsOn: "secureSettings.url",
|
||||
DependsOn: "url",
|
||||
},
|
||||
// Logically, this field should be required when not using a webhook, since the Slack API needs a token.
|
||||
// However, since the UI doesn't allow to say that a field is required or not depending on another field,
|
||||
@@ -397,7 +397,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
|
||||
PropertyName: "token",
|
||||
Secure: true,
|
||||
Required: true,
|
||||
DependsOn: "secureSettings.url",
|
||||
DependsOn: "url",
|
||||
},
|
||||
{
|
||||
Label: "Username",
|
||||
@@ -463,7 +463,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
|
||||
PropertyName: "url",
|
||||
Secure: true,
|
||||
Required: true,
|
||||
DependsOn: "secureSettings.token",
|
||||
DependsOn: "token",
|
||||
},
|
||||
{ // New in 8.4.
|
||||
Label: "Endpoint URL",
|
||||
|
||||
Reference in New Issue
Block a user