Unverified Commit 4714b27e authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

optimization Some problems in front-end (#986)

parent 2cde200a
......@@ -525,8 +525,8 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
toOpen(e.node);
}
let taskIds = [];
for (let i = 0; i < e.selectedNodes.length; i++) {
if(e.selectedNodes[i].isLeaf){
for (let i = 0; i < e.selectedNodes?.length; i++) {
if (e.selectedNodes[i].isLeaf) {
taskIds.push(e.selectedNodes[i].taskId);
}
}
......
......@@ -18,7 +18,7 @@
*/
import {Descriptions, Tag, Typography} from 'antd';
import {Descriptions, Divider, Tag, Typography} from 'antd';
import {RocketOutlined} from '@ant-design/icons';
const {Text, Link} = Typography;
......@@ -26,9 +26,10 @@ const {Text, Link} = Typography;
const Config = (props: any) => {
const {job} = props;
return (<>
return <>
<>
<Descriptions bordered size="small" title={"Dinky Job Configuration"}>
<Divider children={"Dinky Job Configuration"} orientation={"left"}/>
<Descriptions bordered size="small">
<Descriptions.Item label="执行模式">{job?.history?.type ? (
<Tag color="blue" key={job?.history?.type}>
<RocketOutlined/> {job?.history?.type}
......@@ -63,10 +64,12 @@ const Config = (props: any) => {
</> : undefined}
</Descriptions>
</>
<br/><br/>
<>
{(!JSON.stringify(job?.jobHistory?.config).includes("errors") && !job?.jobHistory?.config ) &&
<Descriptions bordered size="small" title={"Flink Job Configuration"}>
{(!JSON.stringify(job?.jobHistory?.config).includes("errors") && job?.jobHistory?.config) &&
<>
<br/>
<Divider children={"Flink Job Configuration"} orientation={"left"}/>
<Descriptions bordered size="small">
<Descriptions.Item label="Execution Mode">
<Tag color="blue" title={"Execution Mode"}>
{job?.jobHistory?.config['execution-config']['execution-mode']}
......@@ -94,11 +97,10 @@ const Config = (props: any) => {
<Text
code>{JSON.stringify(job?.jobHistory?.config['execution-config']['user-config'])}</Text>
</Descriptions.Item>
</Descriptions>
</Descriptions></>
}
</>
</>
)
};
export default Config;
......@@ -36,7 +36,7 @@ const Exception = (props: any) => {
<CodeShow code={job.jobHistory?.exceptions['root-exception'] as string} language='java' height='500px'/>
</TabPane>
<TabPane tab={<span>Exception History</span>} key="ExceptionHistory">
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/>
</TabPane>
</Tabs>}
</>)
......
......@@ -281,12 +281,12 @@ const JobInfo = (props: any) => {
{tabKey === 'cluster' ? <FlinkClusterInfo job={job}/> : undefined}
{tabKey === 'snapshot' ? <CheckPoints job={job}/> : undefined}
{tabKey === 'exception' ? <Exception job={job}/> : undefined}
{tabKey === 'log' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> : undefined}
{tabKey === 'optimize' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> : undefined}
{tabKey === 'log' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined}
{tabKey === 'optimize' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined}
{tabKey === 'flinksql' ? <FlinkSQL job={job}/> : undefined}
{tabKey === 'datamap' ? <DataMap job={job}/> : undefined}
{tabKey === 'olap' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> : undefined}
{tabKey === 'version' ? <TaskVersionInfo job={job} /> : undefined}
{tabKey === 'olap' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined}
{tabKey === 'version' ? <TaskVersionInfo job={job}/> : undefined}
{tabKey === 'alert' ? <Alert job={job}/> : undefined}
</ProCard>
</PageContainer>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment