diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index d1f8298fd..4bcab19d0 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -152,7 +152,10 @@ const monitor = { last_heartbeat_time: 'Last Heartbeat Time', directory_detail: 'Directory Detail', host: 'Host', - directory: 'Directory' + directory: 'Directory', + master_no_data_result_title: 'No Master Nodes Exist', + master_no_data_result_desc: + 'Currently, there are no master nodes exist, please create a master node and refresh this page' }, worker: { cpu_usage: 'CPU Usage', diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index b399b9cf9..a6eb6554e 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -151,7 +151,10 @@ const monitor = { last_heartbeat_time: '最后心跳时间', directory_detail: '目录详情', host: '主机', - directory: '注册目录' + directory: '注册目录', + master_no_data_result_title: 'Master节点不存在', + master_no_data_result_desc: + '目前没有任何Master节点,请先创建Master节点,再访问该页面' }, worker: { cpu_usage: '处理器使用量', diff --git a/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx b/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx index 13b7bd185..68a31c1fd 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx +++ b/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx @@ -27,6 +27,7 @@ import { useI18n } from 'vue-i18n' import { useMaster } from './use-master' import styles from './index.module.scss' import Card from '@/components/card' +import Result from "@/components/result"; import Gauge from '@/components/chart/modules/Gauge' import MasterModal from './master-modal' import type { Ref } from 'vue' @@ -67,7 +68,14 @@ const master = defineComponent({ const { t, clickDetails, onConfirmModal, showModalRef, zkDirectoryRef } = this - return ( + return this.data.length < 1 ? ( + + ) : ( <> {this.data.map((item: MasterNode) => {