-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature][scaleph-ui-react] update flink kubernetes job detail web (#698
) * feature: update swagger info * feature: flink kuberentes job detail web * feature: flink kuberentes job detail web * feature: flink kuberentes job detail web * feature: flink kuberentes job detail web * feature: flink kuberentes job detail web --------- Co-authored-by: wangqi <wangqi@xinxuan.net>
- Loading branch information
Showing
23 changed files
with
694 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
.../pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/ArtifactFlinkJarWeb.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import React, {useRef} from "react"; | ||
import {ActionType, ProCard, ProDescriptions, ProFormInstance} from "@ant-design/pro-components"; | ||
import {connect, useAccess, useIntl} from "@umijs/max"; | ||
import {Props} from '@/typings'; | ||
import {WsArtifactFlinkJar, WsFlinkKubernetesJob} from "@/services/project/typings"; | ||
import {ProDescriptionsItemProps} from "@ant-design/pro-descriptions"; | ||
import {ProCoreActionType} from "@ant-design/pro-utils/es/typing"; | ||
import {Button, message, Popconfirm} from "antd"; | ||
import { | ||
AreaChartOutlined, | ||
CameraOutlined, | ||
CaretRightOutlined, | ||
CloseOutlined, | ||
DashboardOutlined, OrderedListOutlined, | ||
RedoOutlined | ||
} from "@ant-design/icons"; | ||
import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJobService"; | ||
|
||
const ArtifactFlinkJarWeb: React.FC<Props<WsFlinkKubernetesJob>> = (props: any) => { | ||
const intl = useIntl(); | ||
const access = useAccess(); | ||
const actionRef = useRef<ActionType>(); | ||
const formRef = useRef<ProFormInstance>(); | ||
|
||
|
||
const descriptionColumns: ProDescriptionsItemProps<WsArtifactFlinkJar>[] = [ | ||
{ | ||
title: intl.formatMessage({id: 'pages.project.artifact.name'}), | ||
key: `name`, | ||
renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { | ||
return record.artifact?.name | ||
} | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'pages.project.artifact.jar.fileName'}), | ||
key: `fileName`, | ||
dataIndex: 'fileName' | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'pages.resource.flinkRelease.version'}), | ||
key: `flinkVersion`, | ||
dataIndex: 'flinkVersion', | ||
renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { | ||
return record.flinkVersion?.label | ||
} | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'pages.project.artifact.jar.entryClass'}), | ||
key: `entryClass`, | ||
dataIndex: 'entryClass' | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'pages.project.artifact.jar.jarParams'}), | ||
key: `jarParams`, | ||
dataIndex: 'jarParams', | ||
valueType: 'jsonCode' | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'app.common.data.remark'}), | ||
key: `remark`, | ||
dataIndex: 'remark', | ||
renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { | ||
return record.artifact?.remark | ||
} | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'app.common.data.createTime'}), | ||
key: `createTime`, | ||
dataIndex: 'createTime', | ||
}, | ||
{ | ||
title: intl.formatMessage({id: 'app.common.data.updateTime'}), | ||
key: `updateTime`, | ||
dataIndex: 'updateTime', | ||
} | ||
] | ||
|
||
return ( | ||
<ProDescriptions | ||
column={2} | ||
bordered={true} | ||
dataSource={props.flinkKubernetesJobDetail.job?.artifactFlinkJar} | ||
columns={descriptionColumns} | ||
/> | ||
); | ||
} | ||
|
||
|
||
const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) | ||
export default connect(mapModelToProps)(ArtifactFlinkJarWeb); |
52 changes: 52 additions & 0 deletions
52
...ct/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobConfiguration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React, {useEffect, useState} from "react"; | ||
import {ProColumns, ProTable} from "@ant-design/pro-components"; | ||
import {connect, useAccess, useIntl} from "@umijs/max"; | ||
|
||
type Config = { | ||
key: string; | ||
value?: any; | ||
}; | ||
|
||
const FlinkKubernetesJobDetailConfigurationWeb: React.FC = (props: any) => { | ||
const intl = useIntl(); | ||
const access = useAccess(); | ||
const [dataSource, setDataSource] = useState<Config[]>([]) | ||
|
||
useEffect(() => { | ||
if (props.flinkKubernetesJobDetail.job?.jobInstance) { | ||
const config: Array<Config> = [] | ||
Object.entries<[string, any][]>(props.flinkKubernetesJobDetail.job?.jobInstance?.mergedFlinkConfiguration ? {...props.flinkKubernetesJobDetail.job?.jobInstance?.mergedFlinkConfiguration} : {}).forEach(([key, value]) => { | ||
config.push({ | ||
key: key, | ||
value: value | ||
}) | ||
}); | ||
setDataSource(config) | ||
} | ||
}, [props.flinkKubernetesJobDetail.job]); | ||
|
||
const tableColumns: ProColumns<Config>[] = [ | ||
{ | ||
dataIndex: 'key', | ||
width: '40%' | ||
}, | ||
{ | ||
dataIndex: 'value', | ||
}, | ||
] | ||
|
||
return ( | ||
<ProTable<Config> | ||
rowKey="key" | ||
columns={tableColumns} | ||
dataSource={dataSource} | ||
bordered | ||
options={false} | ||
search={false} | ||
showHeader={false} | ||
/> | ||
); | ||
} | ||
|
||
const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) | ||
export default connect(mapModelToProps)(FlinkKubernetesJobDetailConfigurationWeb); |
Oops, something went wrong.