Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 authored and github-actions[bot] committed Dec 27, 2023
1 parent 817b11d commit 5c6d182
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const JobDesc = (props: JobProps) => {

<Descriptions.Item label={l('devops.jobinfo.config.RestartStrategy')}>
<Tag color='blue' title={'Restart Strategy'}>
{jobDetail?.jobDataDto?.config["execution-config"]["restart-strategy"]}
{jobDetail?.jobDataDto?.config['execution-config']['restart-strategy']}
</Tag>
</Descriptions.Item>

Expand All @@ -109,9 +109,7 @@ const JobDesc = (props: JobProps) => {
</Descriptions.Item>

<Descriptions.Item label={l('devops.jobinfo.config.useSqlFragment')}>
{jobDetail?.history?.configJson?.fragment
? l('button.enable')
: l('button.disable')}
{jobDetail?.history?.configJson?.fragment ? l('button.enable') : l('button.disable')}
</Descriptions.Item>

<Descriptions.Item label={l('devops.jobinfo.config.execmode')}>
Expand All @@ -125,7 +123,7 @@ const JobDesc = (props: JobProps) => {
</Descriptions.Item>

<Descriptions.Item label={l('devops.jobinfo.config.JobParallelism')}>
{jobDetail?.jobDataDto?.config["execution-config"]["job-parallelism"]}
{jobDetail?.jobDataDto?.config['execution-config']['job-parallelism']}
</Descriptions.Item>

<Descriptions.Item label={l('global.table.useTime')}>
Expand Down
55 changes: 27 additions & 28 deletions dinky-web/src/types/DevOps/data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<string, string>;
variables: Map<string, string>;
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<string, string>;
variables: Map<string, string>;
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;
Expand All @@ -84,7 +84,7 @@ declare namespace Jobs {
clusterConfigurationId: number;
step: number;
configJson: {
'state.savepoints.dir': string;
'state.savepoints.dir': string;
};
useResult: boolean;
useChangeLog: boolean;
Expand All @@ -104,7 +104,6 @@ declare namespace Jobs {
executorSetting: ExecutorSetting;
};


export type History = {
id: number;
tenantId: number;
Expand Down
8 changes: 4 additions & 4 deletions dinky-web/src/utils/function.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5c6d182

Please sign in to comment.