Skip to content

Commit

Permalink
[Bug] Fix web clear bug (#3971)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <[email protected]>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Nov 27, 2024
1 parent c839219 commit 6c0953a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public boolean clearProcessLog(String processName) {
if (FileUtil.exist(filePath)) {
return FileUtil.del(filePath);
}
return false;
return true;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { SseData, Topic } from '@/models/UseWebSocketModel';
const { Text } = Typography;

export interface ProcessStep extends DataNode {
key: any;
status: string;
type: string;
startTime: string;
Expand Down Expand Up @@ -71,7 +72,7 @@ export default (props: { taskId: number }) => {
subscribeTopic: model?.subscribeTopic
}));

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

const refreshProcess = () => {
onUpdate(undefined);
subscribeTopic(Topic.PROCESS_CONSOLE, [process], (data: SseData) =>
onUpdate(data?.data[process])
);
Expand Down
2 changes: 1 addition & 1 deletion dinky-web/src/pages/DataStudio/Toolbar/Service/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
}, [tabs, selectedKey, props.action, tabActiveKey]);
return (
<PanelGroup direction={'horizontal'}>
<Panel defaultSize={20} style={{ display: 'flex', flexDirection: 'column', padding: 10 }}>
<Panel defaultSize={15} style={{ display: 'flex', flexDirection: 'column', padding: 10 }}>
<Flex justify={'right'}>
<RunToolBarButton
showDesc={showDesc}
Expand Down

0 comments on commit 6c0953a

Please sign in to comment.