feat(notify): the remaining notification services of Uptime Kuma
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:
1 parent
465fda60dc
commit
52819e64bb
20 files changed
+3239
-666
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -956,8 +957,14 @@ templ ChannelsPage(p Page, me Me, v ChannelsView) {
|
||||
<label class="mb-4 block">
|
||||
<span class="mb-1 block text-xs font-medium uppercase tracking-wider text-muted">{ i18n.T(ctx, "channels.service") }</span>
|
||||
<select name="type" data-type-select class="w-full border border-rule bg-transparent px-2 py-1.5 text-sm">
|
||||
for _, pr := range v.Providers {
|
||||
<option value={ pr.Type }>{ i18n.T(ctx, "channels.type_"+pr.Type) }</option>
|
||||
for _, g := range providerGroups(v.Providers) {
|
||||
<optgroup label={ i18n.T(ctx, "channels.group_"+g) }>
|
||||
for _, pr := range v.Providers {
|
||||
if pr.Group == g {
|
||||
<option value={ pr.Type }>{ i18n.T(ctx, "channels.type_"+pr.Type) }</option>
|
||||
}
|
||||
}
|
||||
</optgroup>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
@@ -994,6 +1001,7 @@ templ ChannelsPage(p Page, me Me, v ChannelsView) {
|
||||
// ProviderOption is a notification service the form offers.
|
||||
type ProviderOption struct {
|
||||
Type string
|
||||
Group string
|
||||
Help string
|
||||
Fields []ProviderField
|
||||
}
|
||||
@@ -1232,3 +1240,14 @@ func condKey(c string) string {
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
// providerGroups lists the groups of providers in the order they come.
|
||||
func providerGroups(ps []ProviderOption) []string {
|
||||
var out []string
|
||||
for _, p := range ps {
|
||||
if !slices.Contains(out, p.Group) {
|
||||
out = append(out, p.Group)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
Reference in new issue
Block a user