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