Skip to content

Commit 6c0953a

Browse files
authored
[Bug] Fix web clear bug (#3971)
Co-authored-by: gaoyan1998 <gaoyan1998@users.noreply.github.com>
1 parent c839219 commit 6c0953a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dinky-admin/src/main/java/org/dinky/context/ConsoleContextHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public boolean clearProcessLog(String processName) {
121121
if (FileUtil.exist(filePath)) {
122122
return FileUtil.del(filePath);
123123
}
124-
return false;
124+
return true;
125125
}
126126

127127
/**

dinky-web/src/pages/DataStudio/Toolbar/Service/Output/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { SseData, Topic } from '@/models/UseWebSocketModel';
3737
const { Text } = Typography;
3838

3939
export interface ProcessStep extends DataNode {
40+
key: any;
4041
status: string;
4142
type: string;
4243
startTime: string;
@@ -71,7 +72,7 @@ export default (props: { taskId: number }) => {
7172
subscribeTopic: model?.subscribeTopic
7273
}));
7374

74-
const onUpdate = (data: ProcessStep) => {
75+
const onUpdate = (data?: ProcessStep) => {
7576
setProcessNode((prevState: any) => {
7677
//如果key不一致代表重新提交了任务,清空旧状态
7778
if ((prevState && prevState?.key != data?.key) || !data) {
@@ -97,6 +98,7 @@ export default (props: { taskId: number }) => {
9798
);
9899

99100
const refreshProcess = () => {
101+
onUpdate(undefined);
100102
subscribeTopic(Topic.PROCESS_CONSOLE, [process], (data: SseData) =>
101103
onUpdate(data?.data[process])
102104
);

dinky-web/src/pages/DataStudio/Toolbar/Service/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
296296
}, [tabs, selectedKey, props.action, tabActiveKey]);
297297
return (
298298
<PanelGroup direction={'horizontal'}>
299-
<Panel defaultSize={20} style={{ display: 'flex', flexDirection: 'column', padding: 10 }}>
299+
<Panel defaultSize={15} style={{ display: 'flex', flexDirection: 'column', padding: 10 }}>
300300
<Flex justify={'right'}>
301301
<RunToolBarButton
302302
showDesc={showDesc}

0 commit comments

Comments
 (0)