In this PR: - Display a workflow version visualizer for the version of the workflow the run was executed on. - Display the output of the run as code. https://github.com/user-attachments/assets/d617300a-bff4-4328-a35c-291dc86d81cf
30 lines
766 B
TypeScript
30 lines
766 B
TypeScript
import { WorkflowVersionVisualizer } from '@/workflow/components/WorkflowVersionVisualizer';
|
|
import { WorkflowVersionVisualizerEffect } from '@/workflow/components/WorkflowVersionVisualizerEffect';
|
|
import { useWorkflowRun } from '@/workflow/hooks/useWorkflowRun';
|
|
import { isDefined } from 'twenty-ui';
|
|
|
|
export const WorkflowRunVersionVisualizer = ({
|
|
workflowRunId,
|
|
}: {
|
|
workflowRunId: string;
|
|
}) => {
|
|
const workflowRun = useWorkflowRun({
|
|
workflowRunId,
|
|
});
|
|
if (!isDefined(workflowRun)) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<WorkflowVersionVisualizerEffect
|
|
workflowVersionId={workflowRun.workflowVersionId}
|
|
/>
|
|
|
|
<WorkflowVersionVisualizer
|
|
workflowVersionId={workflowRun.workflowVersionId}
|
|
/>
|
|
</>
|
|
);
|
|
};
|