Skip to content

Commit

Permalink
[Optimization-2822] optimization metrics page tips (DataLinkDC#2821)
Browse files Browse the repository at this point in the history
* optimize metrics page tips

* Spotless Apply

---------

Co-authored-by: Zzm0809 <[email protected]>
  • Loading branch information
Zzm0809 and Zzm0809 authored Dec 27, 2023
1 parent 7fd4ab8 commit 66cae66
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 3 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,9 @@ 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
2 changes: 2 additions & 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,8 @@ 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
7 changes: 7 additions & 0 deletions dinky-web/src/pages/Metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { MetricsTimeFilter } from '@/pages/DevOps/JobDetail/data';
import JobMetricsList from '@/pages/Metrics/JobMetricsList';
import Server from '@/pages/Metrics/Server';
import { getAllConfig } from '@/pages/Metrics/service';
import { l } from '@/utils/intl';
import { PageContainer, ProCard } from '@ant-design/pro-components';
import { Alert } from 'antd';
import { useState } from 'react';

export default () => {
Expand Down Expand Up @@ -55,6 +57,11 @@ 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 @@ -34,6 +34,7 @@ import { EnvConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/E
import { FlinkConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/FlinkConfig';
import { LdapConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/LdapConfig';
import { MavenConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/MavenConfig';
import { MetricsConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/MetricsConfig';
import { ResourcesConfig } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/ResourcesConfig';
import { handleOption, queryDataByParams } from '@/services/BusinessCrud';
import { RESPONSE_CODE } from '@/services/constants';
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 66cae66

Please sign in to comment.