Skip to content

Commit

Permalink
⭐ feat: Node execution progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-gfx committed Sep 10, 2024
1 parent 43ed7d1 commit 03a1aec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/frontend/src/components/nodes/DefaultNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import { WorkflowContext } from "../../context/WorkflowContext";
import { camelCaseToTitleCase, getContrastColor } from "@data-viz-tool/shared";
import CustomHandle from "../handle/CustomHandle";
import IconLoader from "../ComponentLoader";
import LinearProgress from "@mui/material/LinearProgress";

const DefaultNode = ({ id, data, def, type, children }: any) => {
const { deleteNodeById, edges, setEdges } = useContext(WorkflowContext);
const { deleteNodeById, edges, executionResults, isExecuting } =
useContext(WorkflowContext);
const { getNode } = useReactFlow();
const isExecuted = executionResults.hasOwnProperty(`${id}`);

const handleDelete = () => {
deleteNodeById(id);
Expand Down Expand Up @@ -95,6 +98,11 @@ const DefaultNode = ({ id, data, def, type, children }: any) => {
)}
</div>
</div>
<div style={{ width: "100%", height: "5px" }}>
{!isExecuted && isExecuting && (
<LinearProgress style={{ height: "3px" }} />
)}
</div>
{data?.properties && (
<div style={{ padding: "5px 10px" }}>
{data.properties != null &&
Expand Down

0 comments on commit 03a1aec

Please sign in to comment.