simplify creatign notifications

This commit is contained in:
Alex Holliday committed 2025-06-18 14:42:26 +08:00
1 parent a86bc59e09
commit 440ce8a12b
4 files changed
+67 -298

No files matched your search

+1 -17
View File
@@ -44,27 +44,11 @@ const Notifications = () => {
return row.notificationName;
},
},
{
id: "type",
content: "Type",
render: (row) => {
return row.type;
},
},
{
id: "target",
content: "Target",
render: (row) => {
const type = row.type;
if (type === "email") {
return row.address;
}
if (type === "webhook") {
return row.config?.webhookUrl;
}
if (type === "pager_duty") {
return row.config?.routingKey;
}
return row.address;
},
},
{