Browse Source

[Feature][UI Next][V1.0.0-Alpha] Master adds empty data prompt. (#9233)

3.0.0/version-upgrade
songjianet 3 years ago committed by GitHub
parent
commit
052df581f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-ui-next/src/locales/modules/en_US.ts
  2. 5
      dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
  3. 10
      dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx

5
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',

5
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: '处理器使用量',

10
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 ? (
<Result
title={t('monitor.master.master_no_data_result_title')}
description={t('monitor.master.master_no_data_result_desc')}
status={'info'}
size={'medium'}
/>
) : (
<>
<NSpace vertical size={25}>
{this.data.map((item: MasterNode) => {

Loading…
Cancel
Save