Skip to content

Commit

Permalink
optimize metrics page tips
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 committed Dec 27, 2023
1 parent 118d336 commit 50bfa73
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dinky-web/src/locales/en-US/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dinky-web/src/locales/zh-CN/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dinky-web/src/pages/Metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<MetricsTimeFilter>({
Expand Down Expand Up @@ -55,6 +57,7 @@ export default () => {
fixedHeader={true}
//todo 后面title改为下拉列表,用户自定义选择展示哪些layout,而不是全部展示
loading={showServer.loading}
subTitle={!showServer.data && <Alert message={l('metrics.dinky.not.open')} type={'warning'} banner showIcon />}
header={{ extra: [<MetricsFilter onTimeSelect={onTimeSelectChange} />] }}
content={
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -166,7 +167,7 @@ const SettingOverView = () => {
{l('sys.setting.metrics')}
</TagAlignCenter>
),
children: <DSConfig onSave={handleSaveSubmit} data={metricsConfig} />,
children: <MetricsConfig onSave={handleSaveSubmit} data={metricsConfig} />,
path: '/settings/globalsetting/metrics'
},
{
Expand Down

0 comments on commit 50bfa73

Please sign in to comment.