Unverified Commit 90a82dd0 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Feature-1027][admin,web] Add data development task information log details button (#1029)

Co-authored-by: 's avatarwenmo <32723967+wenmo@users.noreply.github.com>
parent 53b55dbe
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${project.parent.basedir}/dlink-admin/target/dlink-admin/lib</directory> <directory>${project.parent.basedir}/dlink-admin/target/dlink-admin-${project.version}/lib</directory>
<outputDirectory>lib</outputDirectory> <outputDirectory>lib</outputDirectory>
<includes> <includes>
<include>*.jar</include> <include>*.jar</include>
......
...@@ -19,12 +19,11 @@ ...@@ -19,12 +19,11 @@
import MonacoEditor from "react-monaco-editor"; import MonacoEditor from "react-monaco-editor";
import * as _monaco from "monaco-editor";
export type CodeShowFormProps = { export type CodeShowFormProps = {
height?: string; height?: string;
width?: string; width?: string;
language: string; language?: string;
theme?: string; theme?: string;
options?: any; options?: any;
code: string; code: string;
...@@ -40,8 +39,8 @@ const CodeShow = (props: CodeShowFormProps) => { ...@@ -40,8 +39,8 @@ const CodeShow = (props: CodeShowFormProps) => {
options = { options = {
selectOnLineNumbers: true, selectOnLineNumbers: true,
renderSideBySide: false, renderSideBySide: false,
autoIndent:'None', autoIndent: 'None',
readOnly:true , readOnly: true,
}, },
code, code,
} = props; } = props;
......
...@@ -18,23 +18,39 @@ ...@@ -18,23 +18,39 @@
*/ */
import {Typography, Divider, Badge, Empty,Tag} from "antd"; import {Badge, Button, Divider, Empty, Modal, Tag, Typography} from "antd";
import {StateType} from "@/pages/DataStudio/model"; import {StateType} from "@/pages/DataStudio/model";
import {connect} from "umi"; import {connect} from "umi";
import {FireOutlined, ScheduleOutlined} from '@ant-design/icons'; import {FireOutlined, ZoomInOutlined} from '@ant-design/icons';
import StudioSqlConfig from "@/components/Studio/StudioRightTool/StudioSqlConfig"; import {isSql} from "@/components/Studio/conf";
import {DIALECT, isSql} from "@/components/Studio/conf"; import {useState} from "react";
import CodeShow from "@/components/Common/CodeShow";
const { Title, Paragraph, Text, Link } = Typography; const {Title, Paragraph, Text, Link} = Typography;
const StudioMsg = (props:any) => { const StudioMsg = (props: any) => {
const {current} = props; const {current} = props;
const [sqlModalVisit, setSqlModalVisit] = useState(false);
const [errorModalVisit, setErrorModalVisit] = useState(false);
const handleOpenSqlModal = () => {
setSqlModalVisit(true);
};
const handleOpenErrorModal = () => {
setErrorModalVisit(true);
};
const handleCancel = () => {
setSqlModalVisit(false);
setErrorModalVisit(false);
};
const renderCommonSqlContent = () => { const renderCommonSqlContent = () => {
return (<> return (<>
<Paragraph> <Paragraph>
<blockquote> <Divider type="vertical"/>{current.console.result.startTime} <blockquote><Divider type="vertical"/>{current.console.result.startTime}
<Divider type="vertical"/>{current.console.result.endTime} <Divider type="vertical"/>{current.console.result.endTime}
<Divider type="vertical"/> <Divider type="vertical"/>
{!(current.console.result.success) ? <><Badge status="error"/><Text type="danger">Error</Text></> : {!(current.console.result.success) ? <><Badge status="error"/><Text type="danger">Error</Text></> :
...@@ -55,17 +71,34 @@ const StudioMsg = (props:any) => { ...@@ -55,17 +71,34 @@ const StudioMsg = (props:any) => {
</Link> <Divider type="vertical"/>{current.console.result.startTime} </Link> <Divider type="vertical"/>{current.console.result.startTime}
<Divider type="vertical"/>{current.console.result.endTime} <Divider type="vertical"/>{current.console.result.endTime}
<Divider type="vertical"/> <Divider type="vertical"/>
{!(current.console.result.status==='SUCCESS') ? <><Badge status="error"/><Text type="danger">Error</Text></> : {!(current.console.result.status === 'SUCCESS') ? <><Badge status="error"/><Text
type="danger">Error</Text></> :
<><Badge status="success"/><Text type="success">Success</Text></>} <><Badge status="success"/><Text type="success">Success</Text></>}
<Divider type="vertical"/> <Divider type="vertical"/>
{current.console.result.jobConfig?.jobName&&<Text code>{current.console.result.jobConfig?.jobName}</Text>} {current.console.result.jobConfig?.jobName && <Text code>{current.console.result.jobConfig?.jobName}</Text>}
{current.console.result.jobId&& {current.console.result.jobId &&
(<> (<>
<Divider type="vertical"/> <Divider type="vertical"/>
<Tag color="blue" key={current.console.result.jobId}> <Tag color="blue" key={current.console.result.jobId}>
<FireOutlined /> {current.console.result.jobId} <FireOutlined/> {current.console.result.jobId}
</Tag> </Tag>
</>)} </>)}
<Button
type="text"
icon={<ZoomInOutlined/>}
onClick={handleOpenSqlModal}
>
SQL
</Button>
{current.console.result.error ?
<Button
type="text"
icon={<ZoomInOutlined/>}
onClick={handleOpenErrorModal}
>
Error
</Button> : undefined
}
</blockquote> </blockquote>
{current.console.result.statement && (<pre style={{height: '100px'}}>{current.console.result.statement}</pre>)} {current.console.result.statement && (<pre style={{height: '100px'}}>{current.console.result.statement}</pre>)}
{current.console.result.error && (<pre style={{height: '100px'}}>{current.console.result.error}</pre>)} {current.console.result.error && (<pre style={{height: '100px'}}>{current.console.result.error}</pre>)}
...@@ -75,14 +108,38 @@ const StudioMsg = (props:any) => { ...@@ -75,14 +108,38 @@ const StudioMsg = (props:any) => {
return ( return (
<Typography> <>
{current?.task&&current.console.result.startTime?(isSql(current.task.dialect) ? renderCommonSqlContent(): <Typography>
renderFlinkSqlContent() ):<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> {current?.task && current.console.result.startTime ? (isSql(current.task.dialect) ? renderCommonSqlContent() :
} renderFlinkSqlContent()) : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
</Typography> }
</Typography>
<Modal
width={'100%'}
visible={sqlModalVisit}
destroyOnClose
centered
footer={false}
onCancel={handleCancel}
>
{current.console.result.statement &&
(<CodeShow height={"80vh"} language={"sql"} code={current.console.result.statement} theme={"vs-dark"}/>)}
</Modal>
<Modal
width={'100%'}
visible={errorModalVisit}
destroyOnClose
centered
footer={false}
onCancel={handleCancel}
>
{current.console.result.error &&
(<CodeShow height={"80vh"} language={"java"} code={current.console.result.error} theme={"vs-dark"}/>)}
</Modal>
</>
); );
}; };
export default connect(({ Studio }: { Studio: StateType }) => ({ export default connect(({Studio}: { Studio: StateType }) => ({
current: Studio.current, current: Studio.current,
}))(StudioMsg); }))(StudioMsg);
...@@ -1630,6 +1630,24 @@ export default (): React.ReactNode => { ...@@ -1630,6 +1630,24 @@ export default (): React.ReactNode => {
<li> <li>
<Link>优化部署文档</Link> <Link>优化部署文档</Link>
</li> </li>
<li>
<Link>修复 yarn-application 任务分隔符错误</Link>
</li>
<li>
<Link>升级 Flink 1.15 版本为 1.15.2</Link>
</li>
<li>
<Link>优化 SqlServer 字段类型查询</Link>
</li>
<li>
<Link>修复重命名作业后保存作业失败</Link>
</li>
<li>
<Link>修复提交历史的第二次弹框时无内容</Link>
</li>
<li>
<Link>新增数据开发任务信息日志详情按钮</Link>
</li>
</ul> </ul>
</Paragraph> </Paragraph>
</Timeline.Item> </Timeline.Item>
......
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