diff --git a/webapp/src/components/DAGGraph/board/index.tsx b/webapp/src/components/DAGGraph/board/index.tsx index a0608e1..e93d0a4 100644 --- a/webapp/src/components/DAGGraph/board/index.tsx +++ b/webapp/src/components/DAGGraph/board/index.tsx @@ -1,6 +1,6 @@ import "./index.css"; -import { FC } from "react"; +import { FC, useRef } from "react"; import CircularProgress from "@mui/material/CircularProgress"; import ReactFlow, { Controls, @@ -28,6 +28,7 @@ export const DAGGraphBoardInner: FC = ({ closeModal, }) => { const { zoom } = useViewport(); + const lastZoom = useRef(zoom); // render unready or errored states if (!state.ready) { return ( @@ -58,18 +59,10 @@ export const DAGGraphBoardInner: FC = ({ ); } // this hack avoids breakage on when zooming - const prefix = zoom; + // const prefix = Date.now(); const elements = { - nodes: state.data.elements.nodes.map((n) => ({ - ...n, - id: `${prefix}-${n.id}`, - })), - edges: state.data.elements.edges.map((n) => ({ - ...n, - id: `${prefix}-${n.id}`, - source: `${prefix}-${n.source}`, - target: `${prefix}-${n.target}`, - })), + nodes: state.data.elements.nodes, + edges: state.data.elements.edges, }; // main render return ( @@ -78,13 +71,13 @@ export const DAGGraphBoardInner: FC = ({ - + ); diff --git a/webapp/src/components/DAGGraph/elements/index.tsx b/webapp/src/components/DAGGraph/elements/index.tsx index 0aa4931..9541f6e 100644 --- a/webapp/src/components/DAGGraph/elements/index.tsx +++ b/webapp/src/components/DAGGraph/elements/index.tsx @@ -21,8 +21,6 @@ import { AddIcon } from "components/Icons"; import { useDAGElementsState } from "./state"; import AddBox from "@mui/icons-material/AddBox"; import { DAGGraphChooseUpdater, DAGGraphUpdater } from "../updater"; -import { ReactNode } from "react"; -import DeleteForever from "@mui/icons-material/DeleteForever"; export const useAutomationNodes = ( automation: AutomationActionData, diff --git a/webapp/src/types/validators/actions.ts b/webapp/src/types/validators/actions.ts index d57db88..86751aa 100644 --- a/webapp/src/types/validators/actions.ts +++ b/webapp/src/types/validators/actions.ts @@ -10,6 +10,7 @@ export const AutomationActionNodeBase = st.type({ alias: st.optional(st.string()), variables: st.optional(st.record(st.string(), st.any())), enabled: st.optional(st.boolean()), + continue_on_error: st.optional(st.boolean()), }); export const ServiceAction = st.intersection([