diff --git a/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/FlinkTable.tsx b/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/FlinkTable.tsx index 1467a1012e..8ba864f148 100644 --- a/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/FlinkTable.tsx +++ b/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/FlinkTable.tsx @@ -28,7 +28,6 @@ import { import { l } from '@/utils/intl'; import { ProCard, ProColumns, ProTable } from '@ant-design/pro-components'; import { Typography } from 'antd'; -import dayjs from "dayjs"; const { Link } = Typography; @@ -110,13 +109,19 @@ const FlinkTable = (props: JobProps): JSX.Element => { { title: l('global.table.startTime'), render: (dom, entity) => { - return entity.startTime === -1 || entity['start-time'] === -1 ? '-' : formatTimestampToYYYYMMDDHHMMSS(entity['start-time'] as number) || formatTimestampToYYYYMMDDHHMMSS(entity.startTime as number); + return entity.startTime === -1 || entity['start-time'] === -1 + ? '-' + : formatTimestampToYYYYMMDDHHMMSS(entity['start-time'] as number) || + formatTimestampToYYYYMMDDHHMMSS(entity.startTime as number); } }, { title: l('global.table.endTime'), render: (dom, entity) => { - return entity.endTime === -1 || entity['end-time'] === -1 ? '-' : formatTimestampToYYYYMMDDHHMMSS(entity['end-time'] as number) || formatTimestampToYYYYMMDDHHMMSS(entity.startTime as number); + return entity.endTime === -1 || entity['end-time'] === -1 + ? '-' + : formatTimestampToYYYYMMDDHHMMSS(entity['end-time'] as number) || + formatTimestampToYYYYMMDDHHMMSS(entity.startTime as number); } }, { diff --git a/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/JobDesc.tsx b/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/JobDesc.tsx index 2ca9f19dae..99e50d90f6 100644 --- a/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/JobDesc.tsx +++ b/dinky-web/src/pages/DevOps/JobDetail/JobOverview/components/JobDesc.tsx @@ -88,7 +88,7 @@ const JobDesc = (props: JobProps) => { - {jobDetail?.jobDataDto?.config["execution-config"]["restart-strategy"]} + {jobDetail?.jobDataDto?.config['execution-config']['restart-strategy']} @@ -109,9 +109,7 @@ const JobDesc = (props: JobProps) => { - {jobDetail?.history?.configJson?.fragment - ? l('button.enable') - : l('button.disable')} + {jobDetail?.history?.configJson?.fragment ? l('button.enable') : l('button.disable')} @@ -125,7 +123,7 @@ const JobDesc = (props: JobProps) => { - {jobDetail?.jobDataDto?.config["execution-config"]["job-parallelism"]} + {jobDetail?.jobDataDto?.config['execution-config']['job-parallelism']} diff --git a/dinky-web/src/types/DevOps/data.d.ts b/dinky-web/src/types/DevOps/data.d.ts index c90faf666b..f25fff4868 100644 --- a/dinky-web/src/types/DevOps/data.d.ts +++ b/dinky-web/src/types/DevOps/data.d.ts @@ -18,7 +18,7 @@ */ import { BaseBeanColumns } from '@/types/Public/data'; -import {Alert, Cluster} from '@/types/RegCenter/data.d'; +import { Alert, Cluster } from '@/types/RegCenter/data.d'; /** * about flink job @@ -48,31 +48,31 @@ declare namespace Jobs { useBatchModel: string; }; - export type ExecutorSetting = { - type: string; - host: string; - port: number; - useBatchModel: boolean; - checkpoint: string; - parallelism: number; - useSqlFragment: boolean; - useStatementSet: boolean; - savePointPath: string; - jobName: string; - config: Map; - variables: Map; - jarFiles: []; - jobManagerAddress: string; - plan: boolean; - remote: boolean; - validParallelism: boolean; - validJobName: boolean; - validHost: boolean; - validPort: boolean; - validConfig: boolean; - validVariables: boolean; - validJarFiles: boolean; - }; + export type ExecutorSetting = { + type: string; + host: string; + port: number; + useBatchModel: boolean; + checkpoint: string; + parallelism: number; + useSqlFragment: boolean; + useStatementSet: boolean; + savePointPath: string; + jobName: string; + config: Map; + variables: Map; + jarFiles: []; + jobManagerAddress: string; + plan: boolean; + remote: boolean; + validParallelism: boolean; + validJobName: boolean; + validHost: boolean; + validPort: boolean; + validConfig: boolean; + validVariables: boolean; + validJarFiles: boolean; + }; export type JobConfigJsonInfo = { type: string; @@ -84,7 +84,7 @@ declare namespace Jobs { clusterConfigurationId: number; step: number; configJson: { - 'state.savepoints.dir': string; + 'state.savepoints.dir': string; }; useResult: boolean; useChangeLog: boolean; @@ -104,7 +104,6 @@ declare namespace Jobs { executorSetting: ExecutorSetting; }; - export type History = { id: number; tenantId: number; diff --git a/dinky-web/src/utils/function.tsx b/dinky-web/src/utils/function.tsx index 463c23a632..e00484b843 100644 --- a/dinky-web/src/utils/function.tsx +++ b/dinky-web/src/utils/function.tsx @@ -619,10 +619,10 @@ export const formatDateToYYYYMMDDHHMMSS = (date: Date) => { }; export const formatTimestampToYYYYMMDDHHMMSS = (timestamp: number) => { - if (timestamp == null) { - return '-'; - } - return dayjs(timestamp).format(DATETIME_FORMAT); + if (timestamp == null) { + return '-'; + } + return dayjs(timestamp).format(DATETIME_FORMAT); }; export const parseDateStringToDate = (dateString: Date) => {