|
|
@ -22,8 +22,8 @@ import { |
|
|
|
provide, |
|
|
|
provide, |
|
|
|
PropType, |
|
|
|
PropType, |
|
|
|
toRef, |
|
|
|
toRef, |
|
|
|
onMounted, |
|
|
|
watch, |
|
|
|
watch |
|
|
|
onBeforeUnmount |
|
|
|
} from 'vue' |
|
|
|
} from 'vue' |
|
|
|
import DagToolbar from './dag-toolbar' |
|
|
|
import DagToolbar from './dag-toolbar' |
|
|
|
import DagCanvas from './dag-canvas' |
|
|
|
import DagCanvas from './dag-canvas' |
|
|
@ -117,6 +117,7 @@ export default defineComponent({ |
|
|
|
graph |
|
|
|
graph |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const statusTimerRef = ref() |
|
|
|
const { refreshTaskStatus } = useNodeStatus({ graph }) |
|
|
|
const { refreshTaskStatus } = useNodeStatus({ graph }) |
|
|
|
|
|
|
|
|
|
|
|
const { onDragStart, onDrop } = useDagDragAndDrop({ |
|
|
|
const { onDragStart, onDrop } = useDagDragAndDrop({ |
|
|
@ -166,15 +167,18 @@ export default defineComponent({ |
|
|
|
saveModelToggle(false) |
|
|
|
saveModelToggle(false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
refreshTaskStatus() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|
() => props.definition, |
|
|
|
() => props.definition, |
|
|
|
() => refreshTaskStatus() |
|
|
|
() => { |
|
|
|
|
|
|
|
if (props.instance) { |
|
|
|
|
|
|
|
refreshTaskStatus() |
|
|
|
|
|
|
|
statusTimerRef.value = setInterval(() => refreshTaskStatus(), 9000) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => clearInterval(statusTimerRef.value)) |
|
|
|
|
|
|
|
|
|
|
|
return () => ( |
|
|
|
return () => ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
class={[ |
|
|
|
class={[ |
|
|
@ -189,6 +193,7 @@ export default defineComponent({ |
|
|
|
onVersionToggle={versionToggle} |
|
|
|
onVersionToggle={versionToggle} |
|
|
|
onSaveModelToggle={saveModelToggle} |
|
|
|
onSaveModelToggle={saveModelToggle} |
|
|
|
onRemoveTasks={removeTasks} |
|
|
|
onRemoveTasks={removeTasks} |
|
|
|
|
|
|
|
onRefresh={refreshTaskStatus} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<div class={Styles.content}> |
|
|
|
<div class={Styles.content}> |
|
|
|
<DagSidebar onDragStart={onDragStart} /> |
|
|
|
<DagSidebar onDragStart={onDragStart} /> |
|
|
|