mirror of https://github.com/statping/statping
Mattermost JSON
parent
e99e807958
commit
70ced8f8bf
|
@ -35,9 +35,9 @@ var mattermoster = &mattermost{¬ifications.Notification{
|
||||||
Author: "Adam Boutcher",
|
Author: "Adam Boutcher",
|
||||||
AuthorUrl: "https://github.com/adamboutcher",
|
AuthorUrl: "https://github.com/adamboutcher",
|
||||||
Delay: time.Duration(10 * time.Second),
|
Delay: time.Duration(10 * time.Second),
|
||||||
Icon: "fab fa-comments",
|
Icon: "far fa-comments",
|
||||||
SuccessData: null.NewNullString(`{ "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "The service {{.Service.Name}} is back online." } }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "View Service", "emoji": true }, "style": "primary", "url": "{{.Core.Domain}}/service/{{.Service.Id}}" }, { "type": "button", "text": { "type": "plain_text", "text": "Go to Statping", "emoji": true }, "url": "{{.Core.Domain}}" } ] } ] }`),
|
SuccessData: null.NewNullString(`{"text": "The service {{.Service.Name}} is back online."}`),
|
||||||
FailureData: null.NewNullString(`{ "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": ":warning: The service {{.Service.Name}} is currently offline! :warning:" } }, { "type": "divider" }, { "type": "section", "fields": [ { "type": "mrkdwn", "text": "*Service:*\n{{.Service.Name}}" }, { "type": "mrkdwn", "text": "*URL:*\n{{.Service.Domain}}" }, { "type": "mrkdwn", "text": "*Status Code:*\n{{.Service.LastStatusCode}}" }, { "type": "mrkdwn", "text": "*When:*\n{{.Failure.CreatedAt}}" }, { "type": "mrkdwn", "text": "*Downtime:*\n{{.Service.Downtime.Human}}" }, { "type": "plain_text", "text": "*Error:*\n{{.Failure.Issue}}" } ] }, { "type": "divider" }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "View Offline Service", "emoji": true }, "style": "danger", "url": "{{.Core.Domain}}/service/{{.Service.Id}}" }, { "type": "button", "text": { "type": "plain_text", "text": "Go to Statping", "emoji": true }, "url": "{{.Core.Domain}}" } ] } ] }`),
|
FailureData: null.NewNullString(`{"text": "The service {{.Service.Name}} has gone offline."}`),
|
||||||
DataType: "json",
|
DataType: "json",
|
||||||
RequestInfo: "Mattermost allows you to customize your own messages with many complex components.",
|
RequestInfo: "Mattermost allows you to customize your own messages with many complex components.",
|
||||||
Limits: 60,
|
Limits: 60,
|
||||||
|
|
Loading…
Reference in New Issue