From d8e0178599e298cd76b50c3dd15cadf4c3d98f76 Mon Sep 17 00:00:00 2001 From: rockfang Date: Thu, 30 May 2024 15:35:49 +0800 Subject: [PATCH] [Fix][UI] Fix the message toast issue (#16088) --- dolphinscheduler-ui/src/views/datasource/list/use-detail.ts | 2 +- .../src/views/security/alarm-instance-manage/use-detail.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-ui/src/views/datasource/list/use-detail.ts b/dolphinscheduler-ui/src/views/datasource/list/use-detail.ts index ab819914df..3f533d00e7 100644 --- a/dolphinscheduler-ui/src/views/datasource/list/use-detail.ts +++ b/dolphinscheduler-ui/src/views/datasource/list/use-detail.ts @@ -59,7 +59,7 @@ export function useDetail(getFieldsValue: Function) { try { const res = await connectDataSource(formatParams()) window.$message.success( - res + res && res.msg ? res.msg : `${t('datasource.test_connect')} ${t('datasource.success')}` ) diff --git a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-detail.ts b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-detail.ts index eb208e0e96..ba20813317 100644 --- a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-detail.ts +++ b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-detail.ts @@ -57,7 +57,7 @@ export function useDetail(getFormValues: Function) { pluginInstanceParams: formatParams(json, values) }) window.$message.success( - res + res && res.msg ? res.msg : `${t('security.alarm_instance.test_send')} ${t('home.success')}` )