b49ec864b1
- Displays the output of the selected step in the `Output` tab - Access to the `Output` tab is prevented when the selected node is currently executed or was skipped - Display the status of the workflow run instead of the status of the workflow version at the top left corner of the workflow run visualizer - Fixed the icon's color for disabled tabs - Use text/primary color for the step's name even when the input is disabled ## Demo: Successful execution https://github.com/user-attachments/assets/02e492f3-1589-48e9-926e-7edb031d9210 ## Demo: Failed execution https://github.com/user-attachments/assets/73e5ec86-5f38-4306-aa9a-46b2e73950da Closes https://github.com/twentyhq/core-team-issues/issues/434
26 lines
687 B
TypeScript
26 lines
687 B
TypeScript
import { useWorkflowRun } from '@/workflow/hooks/useWorkflowRun';
|
|
import { WorkflowRunDiagramCanvas } from '@/workflow/workflow-diagram/components/WorkflowRunDiagramCanvas';
|
|
import styled from '@emotion/styled';
|
|
import { isDefined } from 'twenty-shared';
|
|
|
|
const StyledSourceCodeContainer = styled.div`
|
|
height: 100%;
|
|
`;
|
|
|
|
export const WorkflowRunVisualizer = ({
|
|
workflowRunId,
|
|
}: {
|
|
workflowRunId: string;
|
|
}) => {
|
|
const workflowRun = useWorkflowRun({ workflowRunId });
|
|
if (!isDefined(workflowRun)) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<StyledSourceCodeContainer>
|
|
<WorkflowRunDiagramCanvas workflowRunStatus={workflowRun.status} />
|
|
</StyledSourceCodeContainer>
|
|
);
|
|
};
|