Skip to content

Commit

Permalink
Merge pull request #337 from ca-risken/fix-url
Browse files Browse the repository at this point in the history
fix: notify URL
  • Loading branch information
gassara-kys committed Sep 4, 2023
2 parents 4b09a5c + b0b3a49 commit 39d7ecb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/server/alert/alert_slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const (
- Remove the root cause of the problem
- If it is an intentional setup/operation and the risk is small, archive it
- If the nature of the problem is not urgent and immediate action is difficult, set a target deadline and PEND`
slackNotificationAttachmentJa = "その他、%d件すべてのFindingは <%s/#/alert/alert?project_id=%d&alert_id=%d&from=slack|アラート画面> からご確認ください。"
slackNotificationAttachmentEn = "Please check all %d Findings from <%s/#/alert/alert?project_id=%d&alert_id=%d&from=slack|Alert screen>."
slackNotificationAttachmentJa = "その他、%d件すべてのFindingは <%s/alert/alert?project_id=%d&alert_id=%d&from=slack|アラート画面> からご確認ください。"
slackNotificationAttachmentEn = "Please check all %d Findings from <%s/alert/alert?project_id=%d&alert_id=%d&from=slack|Alert screen>."
slackNotificationTestMessageJa = "RISKENからのテスト通知です"
slackNotificationTestMessageEn = "This is a test notification from RISKEN"
)
Expand Down Expand Up @@ -115,7 +115,7 @@ func getPayload(
Color: getColor(alert.Severity),
Fields: []slack.AttachmentField{
{
Value: fmt.Sprintf("<%s/#/alert/alert?project_id=%d&alert_id=%d&from=slack|%s>", url, project.ProjectId, alert.AlertID, alert.Description),
Value: fmt.Sprintf("<%s/alert/alert?project_id=%d&alert_id=%d&from=slack|%s>", url, project.ProjectId, alert.AlertID, alert.Description),
},
{
Title: "Rules",
Expand Down Expand Up @@ -230,7 +230,7 @@ func getFindingAttachment(url string, projectID, alertID uint32, findings *findi
Color: getColorByScore(f.Score),
Fields: []slack.AttachmentField{
{
Value: fmt.Sprintf("<%s/#/finding/finding?project_id=%d&finding_id=%d&from_score=0&status=1&alert_id=%d&from=slack|%s>", url, projectID, f.FindingID, alertID, f.Description),
Value: fmt.Sprintf("<%s/finding/finding?project_id=%d&finding_id=%d&from_score=0&status=1&alert_id=%d&from=slack|%s>", url, projectID, f.FindingID, alertID, f.Description),
},
{
Title: "DataSource",
Expand Down

0 comments on commit 39d7ecb

Please sign in to comment.