This is an automated email from the ASF dual-hosted git repository.

tomsun28 pushed a commit to branch 2.0.0
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git

commit 5c1a6e2e73dcb1cdb8f55b2267cd2b615eead511
Author: tomsun28 <[email protected]>
AuthorDate: Fri Oct 9 14:43:18 2026 +0800

    fix(web): expose ntfy and wpush receivers in the notification catalog
    
    The backend notice contract supports receiver types 15 (Ntfy) and 16
    (WPUSH) but the React receiver catalog stopped at type 14, so neither
    type could be created or viewed in the UI. Add the option keys, secret
    catalog entries, type definitions (Ntfy: topic required, server URL and
    token optional; WPUSH: token required, channel and topic code
    optional), draft defaults, zod input fields, type keys, and the missing
    wpush i18n entries across all five locales.
    
    Verified end-to-end against the live backend: POST creates both types,
    secrets are masked into configuredSecrets, the receiver list and editor
    render them, and the type select offers both options.
    
    Generated with [Devin](https://devin.ai)
    
    Co-Authored-By: Devin 
<158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
 web-app/src/assets/i18n/en-us.json                 |  8 ++++--
 web-app/src/assets/i18n/ja-jp.json                 |  8 ++++--
 web-app/src/assets/i18n/pt-br.json                 |  8 ++++--
 web-app/src/assets/i18n/zh-cn.json                 |  8 ++++--
 web-app/src/assets/i18n/zh-tw.json                 |  8 ++++--
 .../model/notice-receiver-catalog.ts               | 30 +++++++++++++++++++---
 .../notice-receiver/model/notice-receiver-model.ts |  6 +++++
 .../notice-receiver-data-provider-input.ts         |  6 +++++
 8 files changed, 69 insertions(+), 13 deletions(-)

diff --git a/web-app/src/assets/i18n/en-us.json 
b/web-app/src/assets/i18n/en-us.json
index 81253b7e8b..ae9c2b3c23 100644
--- a/web-app/src/assets/i18n/en-us.json
+++ b/web-app/src/assets/i18n/en-us.json
@@ -2775,7 +2775,8 @@
       "gotify": "Gotify",
       "larkApp": "Lark app",
       "ntfy": "Ntfy",
-      "unknown": "Unknown"
+      "unknown": "Unknown",
+      "wpush": "WPUSH"
     },
     "larkReceiveTypes": {
       "0": "User",
@@ -2815,7 +2816,10 @@
       "chatId": "Chat ID",
       "ntfyServerUrl": "Ntfy server URL",
       "ntfyTopic": "Ntfy topic",
-      "ntfyToken": "Ntfy token"
+      "ntfyToken": "Ntfy token",
+      "wpushToken": "WPUSH API key",
+      "wpushChannel": "WPUSH channel",
+      "wpushTopicCode": "WPUSH topic code"
     }
   },
   "noticeTemplates": {
diff --git a/web-app/src/assets/i18n/ja-jp.json 
b/web-app/src/assets/i18n/ja-jp.json
index f6c5589b49..e6d1c6922b 100644
--- a/web-app/src/assets/i18n/ja-jp.json
+++ b/web-app/src/assets/i18n/ja-jp.json
@@ -2775,7 +2775,8 @@
       "gotify": "Gotify",
       "larkApp": "Lark アプリ",
       "ntfy": "Ntfy",
-      "unknown": "不明"
+      "unknown": "不明",
+      "wpush": "WPUSH"
     },
     "larkReceiveTypes": {
       "0": "ユーザー",
@@ -2815,7 +2816,10 @@
       "chatId": "チャット ID",
       "ntfyServerUrl": "Ntfy サーバー URL",
       "ntfyTopic": "Ntfy トピック",
-      "ntfyToken": "Ntfy トークン"
+      "ntfyToken": "Ntfy トークン",
+      "wpushToken": "WPUSH API キー",
+      "wpushChannel": "WPUSH チャネル",
+      "wpushTopicCode": "WPUSH トピックコード"
     }
   },
   "noticeTemplates": {
diff --git a/web-app/src/assets/i18n/pt-br.json 
b/web-app/src/assets/i18n/pt-br.json
index 27a7770474..2e4b0b4349 100644
--- a/web-app/src/assets/i18n/pt-br.json
+++ b/web-app/src/assets/i18n/pt-br.json
@@ -2775,7 +2775,8 @@
       "gotify": "Gotify",
       "larkApp": "Aplicativo Lark",
       "ntfy": "Ntfy",
-      "unknown": "Desconhecido"
+      "unknown": "Desconhecido",
+      "wpush": "WPUSH"
     },
     "larkReceiveTypes": {
       "0": "Usuário",
@@ -2815,7 +2816,10 @@
       "chatId": "ID do chat",
       "ntfyServerUrl": "URL do servidor Ntfy",
       "ntfyTopic": "Tópico Ntfy",
-      "ntfyToken": "Token Ntfy"
+      "ntfyToken": "Token Ntfy",
+      "wpushToken": "Chave API do WPUSH",
+      "wpushChannel": "Canal WPUSH",
+      "wpushTopicCode": "Código do tópico WPUSH"
     }
   },
   "noticeTemplates": {
diff --git a/web-app/src/assets/i18n/zh-cn.json 
b/web-app/src/assets/i18n/zh-cn.json
index 0ddf01b403..25e802ddd3 100644
--- a/web-app/src/assets/i18n/zh-cn.json
+++ b/web-app/src/assets/i18n/zh-cn.json
@@ -2775,7 +2775,8 @@
       "gotify": "Gotify",
       "larkApp": "飞书应用",
       "ntfy": "Ntfy",
-      "unknown": "未知"
+      "unknown": "未知",
+      "wpush": "WPUSH"
     },
     "larkReceiveTypes": {
       "0": "用户",
@@ -2815,7 +2816,10 @@
       "chatId": "群聊 ID",
       "ntfyServerUrl": "Ntfy 服务地址",
       "ntfyTopic": "Ntfy 主题",
-      "ntfyToken": "Ntfy 令牌"
+      "ntfyToken": "Ntfy 令牌",
+      "wpushToken": "WPUSH API Key",
+      "wpushChannel": "WPUSH 渠道",
+      "wpushTopicCode": "WPUSH 主题码"
     }
   },
   "noticeTemplates": {
diff --git a/web-app/src/assets/i18n/zh-tw.json 
b/web-app/src/assets/i18n/zh-tw.json
index 1d130ac074..02edc6282f 100644
--- a/web-app/src/assets/i18n/zh-tw.json
+++ b/web-app/src/assets/i18n/zh-tw.json
@@ -2775,7 +2775,8 @@
       "gotify": "Gotify",
       "larkApp": "飛書應用",
       "ntfy": "Ntfy",
-      "unknown": "未知"
+      "unknown": "未知",
+      "wpush": "WPUSH"
     },
     "larkReceiveTypes": {
       "0": "使用者",
@@ -2815,7 +2816,10 @@
       "chatId": "群聊 ID",
       "ntfyServerUrl": "Ntfy 服務地址",
       "ntfyTopic": "Ntfy 主題",
-      "ntfyToken": "Ntfy 權杖"
+      "ntfyToken": "Ntfy 權杖",
+      "wpushToken": "WPUSH API Key",
+      "wpushChannel": "WPUSH 渠道",
+      "wpushTopicCode": "WPUSH 主題碼"
     }
   },
   "noticeTemplates": {
diff --git 
a/web-app/src/features/alert/notice-receiver/model/notice-receiver-catalog.ts 
b/web-app/src/features/alert/notice-receiver/model/notice-receiver-catalog.ts
index b458e0d817..d7e1c4dd11 100644
--- 
a/web-app/src/features/alert/notice-receiver/model/notice-receiver-catalog.ts
+++ 
b/web-app/src/features/alert/notice-receiver/model/notice-receiver-catalog.ts
@@ -37,7 +37,13 @@ export type NoticeReceiverOptionKey =
   | 'smnRegion'
   | 'smnTopicUrn'
   | 'serverChanToken'
-  | 'gotifyToken';
+  | 'gotifyToken'
+  | 'ntfyServerUrl'
+  | 'ntfyTopic'
+  | 'ntfyToken'
+  | 'wpushToken'
+  | 'wpushChannel'
+  | 'wpushTopicCode';
 
 export const noticeReceiverSecretKeyCatalog = [
   'hookUrl',
@@ -51,7 +57,9 @@ export const noticeReceiverSecretKeyCatalog = [
   'smnAk',
   'smnSk',
   'serverChanToken',
-  'gotifyToken'
+  'gotifyToken',
+  'ntfyToken',
+  'wpushToken'
 ] as const;
 export type NoticeReceiverSecretKey = (typeof 
noticeReceiverSecretKeyCatalog)[number];
 
@@ -158,6 +166,20 @@ export const receiverTypeDefinitions = [
       field('chatId', 'text', false),
       field('partyId', 'text', false)
     ]
+  },
+  {
+    type: 15,
+    labelKey: 'noticeReceivers.types.ntfy',
+    fields: [field('ntfyServerUrl', 'url', false), field('ntfyTopic'), 
field('ntfyToken', 'password', false)]
+  },
+  {
+    type: 16,
+    labelKey: 'noticeReceivers.types.wpush',
+    fields: [
+      field('wpushToken', 'password'),
+      field('wpushChannel', 'text', false),
+      field('wpushTopicCode', 'text', false)
+    ]
   }
 ] as const satisfies readonly {
   type: number;
@@ -184,7 +206,9 @@ export const noticeReceiverTypeKeys: 
Record<NoticeReceiverType, string> = {
   11: 'huawei-smn',
   12: 'server-chan',
   13: 'gotify',
-  14: 'feishu-app'
+  14: 'feishu-app',
+  15: 'ntfy',
+  16: 'wpush'
 };
 
 const receiverTypeDefinitionByType = new Map(
diff --git 
a/web-app/src/features/alert/notice-receiver/model/notice-receiver-model.ts 
b/web-app/src/features/alert/notice-receiver/model/notice-receiver-model.ts
index 52e2f140c0..9cfe212640 100644
--- a/web-app/src/features/alert/notice-receiver/model/notice-receiver-model.ts
+++ b/web-app/src/features/alert/notice-receiver/model/notice-receiver-model.ts
@@ -75,6 +75,12 @@ export function createNoticeReceiverDraft(): 
NoticeReceiverDraft {
     appId: '',
     larkReceiveType: 0,
     chatId: '',
+    ntfyServerUrl: '',
+    ntfyTopic: '',
+    ntfyToken: '',
+    wpushToken: '',
+    wpushChannel: '',
+    wpushTopicCode: '',
     configuredSecrets: [],
     clearSecrets: []
   };
diff --git 
a/web-app/src/features/alert/notice-receiver/provider/notice-receiver-data-provider-input.ts
 
b/web-app/src/features/alert/notice-receiver/provider/notice-receiver-data-provider-input.ts
index c009a9cde6..371f113d1a 100644
--- 
a/web-app/src/features/alert/notice-receiver/provider/notice-receiver-data-provider-input.ts
+++ 
b/web-app/src/features/alert/notice-receiver/provider/notice-receiver-data-provider-input.ts
@@ -76,6 +76,12 @@ const draftShape = {
   appId: z.string(),
   larkReceiveType: larkReceiveTypeSchema,
   chatId: z.string(),
+  ntfyServerUrl: z.string(),
+  ntfyTopic: z.string(),
+  ntfyToken: z.string(),
+  wpushToken: z.string(),
+  wpushChannel: z.string(),
+  wpushTopicCode: z.string(),
   configuredSecrets: secretKeyArraySchema,
   clearSecrets: secretKeyArraySchema
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to