remove default host from discord notifier

pull/805/head
hunterlong 2020-08-25 15:43:05 -07:00
parent 954e19bd40
commit 13878e5a8f
2 changed files with 24 additions and 19 deletions

36
dev/portainer.json vendored
View File

@ -1,15 +1,21 @@
{
"type": 1,
"title": "Statping",
"description": "Service monitoring with a easy to use status page and mobile app",
"logo": "https://assets.statping.com/icon.png",
"image": "statping/statping:latest",
"ports": [
"8080:8080/tcp"
],
"volumes": [
{
"container": "/app"
}
]
}
[
{
"type": 1,
"title": "Statping",
"restart_policy": "unless-stopped",
"description": "Service monitoring with an easy to use status page and mobile app",
"logo": "https://assets.statping.com/icon.png",
"image": "statping/statping:latest",
"platform": "linux",
"categories": ["monitoring"],
"administrator_only": false,
"ports": [
"8080:8080/tcp"
],
"volumes": [
{
"container": "/app"
}
]
}
]

View File

@ -27,16 +27,15 @@ var Discorder = &discord{&notifications.Notification{
Author: "Hunter Long",
AuthorUrl: "https://github.com/hunterlong",
Delay: time.Duration(5 * time.Second),
Host: null.NewNullString("https://discordapp.com/api/webhooks/****/*****"),
Icon: "fab fa-discord",
SuccessData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently online!"}`),
FailureData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently failing! Reason: {{.Failure.Issue}}"}`),
SuccessData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently back online and was down for {{.Service.Downtime.Human}}."}`),
FailureData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is has been failing for {{.Service.Downtime.Human}}! Reason: {{.Failure.Issue}}"}`),
DataType: "json",
Limits: 60,
Form: []notifications.NotificationForm{{
Type: "text",
Title: "discord webhooker URL",
Placeholder: "Insert your Webhook URL here",
Placeholder: "https://discordapp.com/api/webhooks/****/*****",
DbField: "host",
}}},
}