mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 12:06:42 +08:00
### What problem does this PR solve? Feat: Cancel a running data flow test #9869 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -35,7 +35,6 @@ import {
|
||||
useHideFormSheetOnNodeDeletion,
|
||||
useShowDrawer,
|
||||
} from '../hooks/use-show-drawer';
|
||||
import { LogSheet } from '../log-sheet';
|
||||
import RunSheet from '../run-sheet';
|
||||
import { ButtonEdge } from './edge';
|
||||
import styles from './index.less';
|
||||
@ -65,9 +64,10 @@ const edgeTypes = {
|
||||
interface IProps {
|
||||
drawerVisible: boolean;
|
||||
hideDrawer(): void;
|
||||
showLogSheet(): void;
|
||||
}
|
||||
|
||||
function DataFlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
||||
function DataFlowCanvas({ drawerVisible, hideDrawer, showLogSheet }: IProps) {
|
||||
const { t } = useTranslation();
|
||||
const {
|
||||
nodes,
|
||||
@ -147,17 +147,10 @@ function DataFlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
||||
clearActiveDropdown,
|
||||
]);
|
||||
|
||||
const {
|
||||
visible: logSheetVisible,
|
||||
showModal: showLogSheet,
|
||||
hideModal: hideLogSheet,
|
||||
} = useSetModalState();
|
||||
|
||||
const {
|
||||
run,
|
||||
loading: running,
|
||||
messageId,
|
||||
} = useRunDataflow(showLogSheet!, hideRunOrChatDrawer);
|
||||
const { run, loading: running } = useRunDataflow(
|
||||
showLogSheet!,
|
||||
hideRunOrChatDrawer,
|
||||
);
|
||||
|
||||
const onConnect = (connection: Connection) => {
|
||||
originalOnConnect(connection);
|
||||
@ -311,9 +304,7 @@ function DataFlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
||||
loading={running}
|
||||
></RunSheet>
|
||||
)}
|
||||
{logSheetVisible && (
|
||||
<LogSheet hideModal={hideLogSheet} messageId={messageId}></LogSheet>
|
||||
)}
|
||||
{/* {logSheetVisible && <LogSheet hideModal={hideLogSheet}></LogSheet>} */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user