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

View File

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