diff --git a/dinky-web/src/locales/en-US/pages.ts b/dinky-web/src/locales/en-US/pages.ts index aec840dcb6..d84e42aea9 100644 --- a/dinky-web/src/locales/en-US/pages.ts +++ b/dinky-web/src/locales/en-US/pages.ts @@ -338,6 +338,8 @@ export default { 'metrics.flink.subTask': 'SubTask', 'metrics.flink.subTask.placeholder': 'Please select a SubTask Name', 'metrics.flink.taskId': 'Dinky Job ID', + 'metrics.dinky.not.open': 'Dinky Server monitoring is not enabled, please go to the Setting Center -> Global Settings -> Metrics Configuration -> Dinky JVM Monitor switch to open', + /** * * pages diff --git a/dinky-web/src/locales/zh-CN/pages.ts b/dinky-web/src/locales/zh-CN/pages.ts index 61fc1df775..f84fe2305c 100644 --- a/dinky-web/src/locales/zh-CN/pages.ts +++ b/dinky-web/src/locales/zh-CN/pages.ts @@ -327,6 +327,7 @@ export default { 'metrics.flink.subTask': '子任务', 'metrics.flink.subTask.placeholder': '请选择子任务名称', 'metrics.flink.taskId': 'Dinky 任务ID', + 'metrics.dinky.not.open': '暂未开启 Dinky Server 监控, 请前往 配置中心 -> 全局配置 -> Metrics 配置 -> Dinky JVM Monitor 开关 进行开启', /** * * pages diff --git a/dinky-web/src/pages/Metrics/index.tsx b/dinky-web/src/pages/Metrics/index.tsx index 94cc07454a..bc6c6a5ab5 100644 --- a/dinky-web/src/pages/Metrics/index.tsx +++ b/dinky-web/src/pages/Metrics/index.tsx @@ -25,6 +25,8 @@ import Server from '@/pages/Metrics/Server'; import { getAllConfig } from '@/pages/Metrics/service'; import { PageContainer, ProCard } from '@ant-design/pro-components'; import { useState } from 'react'; +import {Alert} from "antd"; +import {l} from "@/utils/intl"; export default () => { const [timeRange, setTimeRange] = useState({ @@ -55,6 +57,7 @@ export default () => { fixedHeader={true} //todo 后面title改为下拉列表,用户自定义选择展示哪些layout,而不是全部展示 loading={showServer.loading} + subTitle={!showServer.data && } header={{ extra: [] }} content={ <> diff --git a/dinky-web/src/pages/SettingCenter/GlobalSetting/SettingOverView/index.tsx b/dinky-web/src/pages/SettingCenter/GlobalSetting/SettingOverView/index.tsx index 491d35937a..358a99da8b 100644 --- a/dinky-web/src/pages/SettingCenter/GlobalSetting/SettingOverView/index.tsx +++ b/dinky-web/src/pages/SettingCenter/GlobalSetting/SettingOverView/index.tsx @@ -42,6 +42,7 @@ import { BaseConfigProperties, Settings } from '@/types/SettingCenter/data'; import { l } from '@/utils/intl'; import { ProCard } from '@ant-design/pro-components'; import { memo, useEffect, useState } from 'react'; +import {MetricsConfig} from "@/pages/SettingCenter/GlobalSetting/SettingOverView/MetricsConfig"; const imgSize = 25; @@ -166,7 +167,7 @@ const SettingOverView = () => { {l('sys.setting.metrics')} ), - children: , + children: , path: '/settings/globalsetting/metrics' }, {