feat(notify): the remaining notification services of Uptime Kuma
ci / image (pull_request) Successful in 4m24s
ci / build (pull_request) Successful in 5m6s
ci / lint (pull_request) Successful in 12m3s
ci / test (pull_request) Successful in 15m27s

Adds 93 services, bringing the total to 109 plus webhook and email:
chat and messengers (DingTalk, Feishu, LINE, Nextcloud Talk, Threema,
WhatsApp gateways, Nostr, Home Assistant, …), push (Bark, Gorush,
ServerChan, …), SMS and calls (Twilio, Plivo, 46elks, Alibaba Cloud,
Teltonika routers, …), email APIs (SendGrid, Brevo, Resend, Microsoft
Graph, …) and incident management (Grafana OnCall, Jira Service
Management, Splunk On-Call, Squadcast, SIGNL4, …). Customers bring
their own credentials; secrets are sealed like the others.

Services pair incidents by their ID where they can resolve alerts.
Signed requests (DingTalk, Nextcloud Talk, Alibaba Cloud) and replies
that report failures with status 200 are handled. Nostr messages are
sealed and gift-wrapped (NIP-17/59) with go-nostr, but sent over our own
WebSocket connections so relays go through the network guard. Messages
now carry the monitor's name, ID and target.

The channel form groups services, the i18n test derives provider keys
from the registry, and channel types may contain digits.

Refs #92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 17:40:19 +01:00
1 parent 465fda60dc
commit 52819e64bb
20 files changed
+3239 -666

No files matched your search

+9 -1
View File
@@ -709,7 +709,7 @@ func (s *Server) channelsView(c *gin.Context, p *principal, page web.Page, me we
v := web.ChannelsView{EmailAvailable: s.smtp != nil, CanWrite: p.Grants.Can(authz.NotificationsWrite), Languages: s.catalog.Supported()}
ctx2 := c.Request.Context()
for _, pr := range notify.Providers {
opt := web.ProviderOption{Type: pr.Type}
opt := web.ProviderOption{Type: pr.Type, Group: pr.Group}
if help := i18n.T(ctx2, "channels.help_"+pr.Type); help != "channels.help_"+pr.Type {
opt.Help = help
}
@@ -721,6 +721,14 @@ func (s *Server) channelsView(c *gin.Context, p *principal, page web.Page, me we
}
v.Providers = append(v.Providers, opt)
}
// By group, then by name; the first is preselected.
groupOrder := []string{"chat", "push", "sms", "email", "incident", "other"}
slices.SortStableFunc(v.Providers, func(a, b web.ProviderOption) int {
if d := slices.Index(groupOrder, a.Group) - slices.Index(groupOrder, b.Group); d != 0 {
return d
}
return strings.Compare(strings.ToLower(i18n.T(ctx2, "channels.type_"+a.Type)), strings.ToLower(i18n.T(ctx2, "channels.type_"+b.Type)))
})
for _, r := range rows {
cv := viewChannel(r)
target := cv.URL
+1 -1
View File
@@ -129,7 +129,7 @@ func (s *Server) openProviderSettings(typ string, raw []byte) (map[string]string
func (s *Server) messageFor(ev notify.Event, locale string) notify.Message {
l := s.catalog.Match(locale)
data := map[string]any{"Monitor": ev.Monitor.Name}
m := notify.Message{Event: ev.Kind, Key: ev.IncidentID}
m := notify.Message{Event: ev.Kind, Key: ev.IncidentID, Monitor: ev.Monitor.Name, MonitorID: ev.Monitor.ID, Target: ev.Monitor.Target}
var lines []string
switch ev.Kind {
case notify.Opened:
+11 -1
View File
@@ -99,7 +99,17 @@ func TestProviderChannel(t *testing.T) {
if !strings.Contains(bodies[0], "Test von UptimeSebi") || !strings.Contains(bodies[1], `"chat_id":"-100999"`) {
t.Errorf("telegram bodies = %v", bodies)
}
if _, _, page := owner.page("/settings/channels"); !strings.Contains(page, `name="settings.bot_token"`) || !strings.Contains(page, "-100999") {
_, _, page := owner.page("/settings/channels")
if !strings.Contains(page, `name="settings.bot_token"`) || !strings.Contains(page, "-100999") {
t.Error("the channels page lacks the service form or the channel")
}
// Services are grouped, and every one has its settings form.
if !strings.Contains(page, `<optgroup label="SMS and calls">`) {
t.Error("the services are not grouped")
}
for _, p := range notify.Providers {
if !strings.Contains(page, `<fieldset data-type="`+p.Type+`"`) {
t.Errorf("the channels page lacks the form of %s", p.Type)
}
}
}