diff --git a/src/components/dialogs/add/NotificationChannelAdd.vue b/src/components/dialogs/add/NotificationChannelAdd.vue index 2dbc527b..7e7bde57 100644 --- a/src/components/dialogs/add/NotificationChannelAdd.vue +++ b/src/components/dialogs/add/NotificationChannelAdd.vue @@ -89,7 +89,10 @@ /> - + + + + @@ -162,6 +165,16 @@ const labels = { my_link: {token: t('ClientSecret'), sid: t('ClientID')} } +const verify = computed<'false' | null>({ + get: () => (editedItem.value.verify?.toLowerCase() === 'false' ? 'false' : null), + set: val => (editedItem.value.verify = val) +}) + +const verifyText = computed({ + get: () => (editedItem.value.verify?.toLowerCase() === 'false' ? null : editedItem.value.verify), + set: (val: string) => (editedItem.value.verify = val === '' ? null : val) +}) + const edit = ref(false) const showPlatformId = ref(false) @@ -207,10 +220,11 @@ watch(dialog, val => { async function save() { if (edit.value) { + const {id, ...update} = editedItem.value await store.dispatch('notificationChannels/updateNotificationChannel', [ - editedItem.value.id, + id, { - ...editedItem.value + ...update } ]) } else { diff --git a/src/locales/en.ts b/src/locales/en.ts index a45ededf..177770e6 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -288,7 +288,9 @@ export const en = { NotificationKeyGenerate: 'Genereates New Encryption Key And Copies It To Clipboard', NotificationKey: 'Set NOTIFICATION_KEY="{New Key}" In Config To Use Generated Key', Verify: 'Verify', - VerifyInfo: 'Verify SSL certificates of host. True/False', + CAPath: 'CA Bundle Path', + CAPathInfo: 'Path to a CA bundle on the Alerta server. Leave empty to use the default.', + VerifyInfo: 'Verify SSL certificates of host', Host: 'Host', HostInfo: 'Url for sms/email provider', NotificationChannels: 'Notification Channels', diff --git a/src/plugins/store/types/notificationChannel-types.ts b/src/plugins/store/types/notificationChannel-types.ts index 932fb2cd..6a244f8d 100644 --- a/src/plugins/store/types/notificationChannel-types.ts +++ b/src/plugins/store/types/notificationChannel-types.ts @@ -19,7 +19,7 @@ export type NotificationChannel = { platformId?: string sender: string type: NotificationChannelType - verify: boolean | null + verify: string | null } export type Filter = { @@ -68,7 +68,7 @@ export type Actions = { createNotificationChannel({dispatch}: AugmentedActionContext, notificationChannel: NotificationChannel): void updateNotificationChannel( {dispatch}: AugmentedActionContext, - [notificationChannelId, update]: [string, NotificationChannel] + [notificationChannelId, update]: [string, Omit] ): void deleteNotificationChannel({dispatch}: AugmentedActionContext, notificationChannelId: NotificationChannel['id']): void setPagination({commit}: AugmentedActionContext, pagination: Pagination): void