Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-mingye authored and github-actions[bot] committed Nov 15, 2023
1 parent a21e3de commit cb703dc
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 33 deletions.
16 changes: 8 additions & 8 deletions dinky-web/src/components/Transfer/TreeTransfer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
*
*/

import { l } from '@/utils/intl';
import { WarningMessage } from '@/utils/messages';
import { Transfer, Tree } from 'antd';
import type { TransferDirection, TransferItem } from 'antd/es/transfer';
import type { DataNode } from 'antd/es/tree';
import React, { Key } from 'react';
import {WarningMessage} from "@/utils/messages";
import {l} from "@/utils/intl";

const { DirectoryTree } = Tree;
interface TreeTransferProps {
Expand Down Expand Up @@ -77,18 +77,18 @@ export const TreeTransfer: React.FC<TreeTransferProps> = ({
defaultExpandAll
checkedKeys={checkedKeys}
treeData={generateTree(dataSource, targetKeys)}
onCheck={ async (_, { node: { key,isLeaf } }) => {
onCheck={async (_, { node: { key, isLeaf } }) => {
if (isLeaf) {
onItemSelect(key as string, !isChecked(checkedKeys, key));
}else{
WarningMessage(l('rc.udf.register.select'))
} else {
WarningMessage(l('rc.udf.register.select'));
}
}}
onSelect={ async (_, { node :{key,isLeaf}}) => {
onSelect={async (_, { node: { key, isLeaf } }) => {
if (isLeaf) {
onItemSelect(key as string, !isChecked(checkedKeys, key));
}else{
WarningMessage(l('rc.udf.register.select'))
} else {
WarningMessage(l('rc.udf.register.select'));
}
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion dinky-web/src/locales/en-US/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ export default {
'devops.jobinfo.savepoint.stop': 'SavePoint Pause',
'devops.jobinfo.savepoint.trigger': 'SavePoint Triggers',
'devops.jobinfo.smart_stop': 'Smart Stop',
'devops.jobinfo.unable.obtain.status': 'Unable to connect to Flink cluster to obtain the latest job status information',
'devops.jobinfo.unable.obtain.status':
'Unable to connect to Flink cluster to obtain the latest job status information',
'devops.jobinfo.version.delete': 'Delete Version',
'devops.jobinfo.version.delete.sure': 'Are you sure you want to remove this version?V{version}',
'devops.jobinfo.version.latestVersion': 'Current Version',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { transformTableDataToCsv } from '@/utils/function';
import { l } from '@/utils/intl';
import { SearchOutlined } from '@ant-design/icons';
import { Highlight } from '@ant-design/pro-layout/es/components/Help/Search';
import { Button, Empty, Input, InputRef, Space, Table, Tag } from 'antd';
import { Button, Empty, Input, InputRef, Space, Table } from 'antd';
import { ColumnsType, ColumnType } from 'antd/es/table';
import { FilterConfirmProps } from 'antd/es/table/interface';
import { DataIndex } from 'rc-table/es/interface';
Expand Down
52 changes: 30 additions & 22 deletions dinky-web/src/pages/DevOps/JobDetail/JobOverview/JobOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import FlinkDag from '@/components/FlinkDag';
import { JobProps } from '@/pages/DevOps/JobDetail/data';
import FlinkTable from '@/pages/DevOps/JobDetail/JobOverview/components/FlinkTable';
import JobDesc from '@/pages/DevOps/JobDetail/JobOverview/components/JobDesc';
import { l } from '@/utils/intl';
import { ProCard } from '@ant-design/pro-components';
import { Button, Empty, Result } from 'antd';
import { useState } from 'react';
import { isStatusDone } from '../../function';
import { l } from '@/utils/intl';

const JobConfigTab = (props: JobProps) => {
const { jobDetail } = props;
Expand All @@ -34,33 +34,41 @@ const JobConfigTab = (props: JobProps) => {

return (
<>
{
isStatusDone(jobDetail?.instance?.status as string) && !showHistory ? <Result
status="warning"
{isStatusDone(jobDetail?.instance?.status as string) && !showHistory ? (
<Result
status='warning'
title={l('devops.jobinfo.unable.obtain.status')}
extra={
<Button type="primary" key="console" onClick={()=>{setShowHistory(true)}}>
<Button
type='primary'
key='console'
onClick={() => {
setShowHistory(true);
}}
>
{l('devops.jobinfo.recently.job.status')}
</Button>
}
/> : undefined
}
{(showHistory || !isStatusDone(jobDetail?.instance?.status as string)) ?
<><JobDesc jobDetail={jobDetail}/>
<ProCard
style={{
height: '40vh'
}}
>
{job ? (
<FlinkDag job={job} checkPoints={jobDetail.jobDataDto.checkpoints}/>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
)}
</ProCard>
/>
) : undefined}
{showHistory || !isStatusDone(jobDetail?.instance?.status as string) ? (
<>
<JobDesc jobDetail={jobDetail} />
<ProCard
style={{
height: '40vh'
}}
>
{job ? (
<FlinkDag job={job} checkPoints={jobDetail.jobDataDto.checkpoints} />
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
</ProCard>

<FlinkTable jobDetail={jobDetail} /></> : undefined
}
<FlinkTable jobDetail={jobDetail} />
</>
) : undefined}
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion dinky-web/src/pages/DevOps/JobDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

import JobLifeCycleTag from '@/components/JobTags/JobLifeCycleTag';
import StatusTag from '@/components/JobTags/StatusTag';
import AlertHistory from '@/pages/DevOps/JobDetail/AlertHistory';
import CheckPoints from '@/pages/DevOps/JobDetail/CheckPointsTab';
import JobLineage from '@/pages/DevOps/JobDetail/JobLineage';
Expand All @@ -36,7 +37,6 @@ import { useRequest } from '@umijs/max';
import { Tag } from 'antd';
import { useState } from 'react';
import { connect, useLocation } from 'umi';
import StatusTag from "@/components/JobTags/StatusTag";

/**
* Enum defining different operators for the JobDetail component.
Expand Down

0 comments on commit cb703dc

Please sign in to comment.