From 052df581f58405c840d97711f75894a682028a3c Mon Sep 17 00:00:00 2001
From: songjianet <1778651752@qq.com>
Date: Mon, 28 Mar 2022 12:15:44 +0800
Subject: [PATCH] [Feature][UI Next][V1.0.0-Alpha] Master adds empty data
prompt. (#9233)
---
dolphinscheduler-ui-next/src/locales/modules/en_US.ts | 5 ++++-
dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts | 5 ++++-
.../src/views/monitor/servers/master/index.tsx | 10 +++++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
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) => {