Show a slack target's retry setting in the target list (closes #395)
check / check (push) Failing after 1m6s

The target list showed only the masked webhook URL for a slack
target, though its edit page saves a retry setting and delivery
honours it. It now shows the same retry fields, with the same
labels and wording, as an http target.

Model: opus-5-5
This commit is contained in:
2026-10-02 20:47:06 +00:00
parent da75950e91
commit 44cfe72bbc
2 changed files with 39 additions and 8 deletions
+9 -6
View File
@@ -97,7 +97,7 @@ func targetConfigFields(
) []ConfigField {
switch t.Type {
case database.TargetTypeSlack:
return slackConfigFields(t.Config)
return slackConfigFields(t)
case database.TargetTypeHTTP:
return httpConfigFields(t)
case database.TargetTypeDatabase:
@@ -119,18 +119,21 @@ func unavailableConfigFields() []ConfigField {
}}
}
// slackConfigFields describes a Slack target. Only the masked
// webhook URL is shown; the full URL is the credential.
func slackConfigFields(configJSON string) []ConfigField {
cfg, err := parseSlackConfig(configJSON)
// slackConfigFields describes a Slack target: its masked
// webhook URL and its retry settings. Only the masked URL is
// shown; the full URL is the credential.
func slackConfigFields(t *database.Target) []ConfigField {
cfg, err := parseSlackConfig(t.Config)
if err != nil {
return unavailableConfigFields()
}
return []ConfigField{{
fields := []ConfigField{{
Label: "Webhook URL",
Value: cfg.MaskedWebhookURL(),
}}
return append(fields, retryFields(t)...)
}
// httpConfigFields describes an HTTP target: its destination