Browse Source

[Improvement-16807][UI] Optimize Statistics international display (#16808)

dev
小可耐 1 week ago committed by GitHub
parent
commit
15adf21e45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      dolphinscheduler-ui/src/locales/en_US/monitor.ts
  2. 13
      dolphinscheduler-ui/src/locales/zh_CN/monitor.ts
  3. 6
      dolphinscheduler-ui/src/views/monitor/statistics/statistics/index.tsx
  4. 18
      dolphinscheduler-ui/src/views/monitor/statistics/statistics/list-command-table.tsx
  5. 20
      dolphinscheduler-ui/src/views/monitor/statistics/statistics/list-error-command-table.tsx

14
dolphinscheduler-ui/src/locales/en_US/monitor.ts

@ -60,9 +60,17 @@ export default {
'Currently, there are no DB nodes exist, please create a DB node and refresh this page' 'Currently, there are no DB nodes exist, please create a DB node and refresh this page'
}, },
statistics: { statistics: {
command_number_of_waiting_for_running: command_statistics_list: 'Command Statistics List',
'Command Number Of Waiting For Running', failure_command_statistics_list: 'Failure Command Statistics List',
failure_command_number: 'Failure Command Number' command_type: 'Command Type',
command_param: 'Command Param',
task_info: 'Task Info',
task_params: 'Task Params',
worker_info: 'Worker Info',
warning_info: 'Warning Info',
executor_id: 'Executor Id',
message: 'Message',
time: 'Time'
}, },
audit_log: { audit_log: {
user_name: 'User Name', user_name: 'User Name',

13
dolphinscheduler-ui/src/locales/zh_CN/monitor.ts

@ -59,8 +59,17 @@ export default {
db_no_data_result_desc: '目前没有任何DB节点,请先创建DB节点,再访问该页面' db_no_data_result_desc: '目前没有任何DB节点,请先创建DB节点,再访问该页面'
}, },
statistics: { statistics: {
command_number_of_waiting_for_running: '待执行的命令数', command_statistics_list: '命令统计列表',
failure_command_number: '执行失败的命令数' failure_command_statistics_list: '失败命令统计列表',
command_type: '命令类型',
command_param: '命令参数',
task_info: '任务信息',
task_params: '任务参数',
worker_info: 'Worker信息',
warning_info: '警告信息',
executor_id: '执行用户Id',
message: '错误信息',
time: '时间'
}, },
audit_log: { audit_log: {
user_name: '用户名称', user_name: '用户名称',

6
dolphinscheduler-ui/src/views/monitor/statistics/statistics/index.tsx

@ -19,12 +19,14 @@ import { defineComponent } from 'vue'
import { NGrid, NGi, NTabs, NTabPane, NCard } from 'naive-ui' import { NGrid, NGi, NTabs, NTabPane, NCard } from 'naive-ui'
import ListCommandTable from './list-command-table' import ListCommandTable from './list-command-table'
import ListErrorCommandTable from './list-error-command-table' import ListErrorCommandTable from './list-error-command-table'
import { useI18n } from 'vue-i18n'
const statistics = defineComponent({ const statistics = defineComponent({
name: 'statistics', name: 'statistics',
setup() {}, setup() {},
render() { render() {
const { t } = useI18n()
return ( return (
<NGrid x-gap='12' y-gap='8' cols='1' responsive='screen'> <NGrid x-gap='12' y-gap='8' cols='1' responsive='screen'>
<NGi> <NGi>
@ -39,14 +41,14 @@ const statistics = defineComponent({
> >
<NTabPane <NTabPane
name='command' name='command'
tab='Command Statistics List' tab={t('monitor.statistics.command_statistics_list')}
display-directiv='show' display-directiv='show'
> >
<ListCommandTable></ListCommandTable> <ListCommandTable></ListCommandTable>
</NTabPane> </NTabPane>
<NTabPane <NTabPane
name='command-error' name='command-error'
tab='Failure Command Statistics List' tab={t('monitor.statistics.failure_command_statistics_list')}
display-directiv='show' display-directiv='show'
> >
<ListErrorCommandTable></ListErrorCommandTable> <ListErrorCommandTable></ListErrorCommandTable>

18
dolphinscheduler-ui/src/views/monitor/statistics/statistics/list-command-table.tsx

@ -59,18 +59,18 @@ const ListCommandTable = defineComponent({
...COLUMN_WIDTH_CONFIG['index'] ...COLUMN_WIDTH_CONFIG['index']
}, },
{ {
title: 'Command Type', title: t('monitor.statistics.command_type'),
key: 'commandType', key: 'commandType',
...COLUMN_WIDTH_CONFIG['userName'] ...COLUMN_WIDTH_CONFIG['name']
}, },
{ {
title: 'Command Param', title: t('monitor.statistics.command_param'),
key: 'commandParam', key: 'commandParam',
...COLUMN_WIDTH_CONFIG['linkName'] ...COLUMN_WIDTH_CONFIG['linkName']
}, },
{ {
title: 'Task Info', title: t('monitor.statistics.task_info'),
key: 'id', key: 'id',
width: 300, width: 300,
render: (row: any) => { render: (row: any) => {
@ -87,7 +87,7 @@ const ListCommandTable = defineComponent({
}, },
{ {
title: 'Task Params', title: t('monitor.statistics.task_params'),
key: 'id', key: 'id',
width: 300, width: 300,
render: (row: any) => { render: (row: any) => {
@ -104,7 +104,7 @@ const ListCommandTable = defineComponent({
}, },
{ {
title: 'Worker Info', title: t('monitor.statistics.worker_info'),
key: 'id', key: 'id',
width: 220, width: 220,
render: (row: any) => { render: (row: any) => {
@ -119,7 +119,7 @@ const ListCommandTable = defineComponent({
}, },
{ {
title: 'Warning Info', title: t('monitor.statistics.warning_info'),
key: 'id', key: 'id',
width: 200, width: 200,
render: (row: any) => { render: (row: any) => {
@ -131,12 +131,12 @@ const ListCommandTable = defineComponent({
} }
}, },
{ {
title: 'Executor Id', title: t('monitor.statistics.executor_id'),
key: 'executorId', key: 'executorId',
...COLUMN_WIDTH_CONFIG['type'] ...COLUMN_WIDTH_CONFIG['type']
}, },
{ {
title: 'Time', title: t('monitor.statistics.time'),
key: 'startTime', key: 'startTime',
width: 280, width: 280,
render: (row: any) => { render: (row: any) => {

20
dolphinscheduler-ui/src/views/monitor/statistics/statistics/list-error-command-table.tsx

@ -59,18 +59,18 @@ const ListErrorCommandTable = defineComponent({
...COLUMN_WIDTH_CONFIG['index'] ...COLUMN_WIDTH_CONFIG['index']
}, },
{ {
title: 'Command Type', title: t('monitor.statistics.command_type'),
key: 'commandType', key: 'commandType',
...COLUMN_WIDTH_CONFIG['userName'] ...COLUMN_WIDTH_CONFIG['name']
}, },
{ {
title: 'Command Param', title: t('monitor.statistics.command_param'),
key: 'commandParam', key: 'commandParam',
...COLUMN_WIDTH_CONFIG['linkName'] ...COLUMN_WIDTH_CONFIG['linkName']
}, },
{ {
title: 'Task Info', title: t('monitor.statistics.task_info'),
key: 'id', key: 'id',
width: 300, width: 300,
render: (row: any) => { render: (row: any) => {
@ -87,7 +87,7 @@ const ListErrorCommandTable = defineComponent({
}, },
{ {
title: 'Task Params', title: t('monitor.statistics.task_params'),
key: 'id', key: 'id',
width: 300, width: 300,
render: (row: any) => { render: (row: any) => {
@ -104,7 +104,7 @@ const ListErrorCommandTable = defineComponent({
}, },
{ {
title: 'Worker Info', title: t('monitor.statistics.worker_info'),
key: 'id', key: 'id',
width: 220, width: 220,
render: (row: any) => { render: (row: any) => {
@ -119,7 +119,7 @@ const ListErrorCommandTable = defineComponent({
}, },
{ {
title: 'Warning Info', title: t('monitor.statistics.warning_info'),
key: 'id', key: 'id',
width: 200, width: 200,
render: (row: any) => { render: (row: any) => {
@ -131,17 +131,17 @@ const ListErrorCommandTable = defineComponent({
} }
}, },
{ {
title: 'Message', title: t('monitor.statistics.message'),
key: 'message', key: 'message',
...COLUMN_WIDTH_CONFIG['linkName'] ...COLUMN_WIDTH_CONFIG['linkName']
}, },
{ {
title: 'Executor Id', title: t('monitor.statistics.executor_id'),
key: 'executorId', key: 'executorId',
...COLUMN_WIDTH_CONFIG['type'] ...COLUMN_WIDTH_CONFIG['type']
}, },
{ {
title: 'Time', title: t('monitor.statistics.time'),
key: 'startTime', key: 'startTime',
width: 280, width: 280,
render: (row: any) => { render: (row: any) => {

Loading…
Cancel
Save