diff --git a/client/src/pages/alerts/components/ContactPointsTable/components/ContactPointFormModal.tsx b/client/src/pages/alerts/components/ContactPointsTable/components/ContactPointFormModal.tsx index 11eff34..da95203 100644 --- a/client/src/pages/alerts/components/ContactPointsTable/components/ContactPointFormModal.tsx +++ b/client/src/pages/alerts/components/ContactPointsTable/components/ContactPointFormModal.tsx @@ -20,6 +20,8 @@ type FormValues = { type: string telegramApiKey?: string telegramTargetChannel?: number + ntfyEndpoint?: string + ntfyAuthToken?: string } export const ContactPointFormModal = ({ @@ -45,6 +47,13 @@ export const ContactPointFormModal = ({ } } + if (v.type === 'ntfy') { + return { + endpoint: v.ntfyEndpoint, + authToken: v.ntfyAuthToken, + } + } + return {} } @@ -56,6 +65,10 @@ export const ContactPointFormModal = ({ telegramApiKey: parsedTypeConfig.apiKey ?? '', telegramTargetChannel: parsedTypeConfig.targetChannel, }), + ...(parsedTypeConfig?.type === 'ntfy' && { + ntfyEndpoint: parsedTypeConfig.endpoint ?? '', + ntfyAuthToken: parsedTypeConfig.authToken ?? '', + }), }), onSubmit: async (v) => { if (isLoading) { @@ -105,6 +118,7 @@ export const ContactPointFormModal = ({ @@ -132,6 +146,26 @@ export const ContactPointFormModal = ({ )} + {type === 'ntfy' && ( + <> +
+ + +
+ +
+ + +
+ + )} +