From cf820af904f6710090db3e7580c581914d6cb6c1 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 22 Feb 2023 08:19:40 -0500 Subject: [PATCH 1/2] fix: add version bump Signed-off-by: James --- packages/console/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/console/package.json b/packages/console/package.json index 004303cbe..251821a93 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteorg/console", - "version": "0.0.8", + "version": "0.0.9", "description": "Flyteconsole main app module", "main": "./dist/index.js", "module": "./lib/index.js", From 954214f17efb11c09e2b99c8822379b2d45a92dd Mon Sep 17 00:00:00 2001 From: James Date: Wed, 22 Feb 2023 13:24:28 -0500 Subject: [PATCH 2/2] fix: pausedTaskComponent test Signed-off-by: James --- .../components/Launch/LaunchForm/useResumeFormState.ts | 7 +++++-- .../flytegraph/ReactFlow/PausedTasksComponent.tsx | 10 +++++++--- .../ReactFlow/test/PausedTasksComponent.test.tsx | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/console/src/components/Launch/LaunchForm/useResumeFormState.ts b/packages/console/src/components/Launch/LaunchForm/useResumeFormState.ts index a7420164b..4ce0a2dcd 100644 --- a/packages/console/src/components/Launch/LaunchForm/useResumeFormState.ts +++ b/packages/console/src/components/Launch/LaunchForm/useResumeFormState.ts @@ -75,7 +75,8 @@ async function submit( { compiledNode, nodeExecutionId }: TaskResumeContext, ) { const signalId = - compiledNode?.gateNode?.signal?.signalId || compiledNode?.gateNode?.approve?.signalId; + compiledNode?.gateNode?.signal?.signalId || + compiledNode?.gateNode?.approve?.signalId; const isApprovedCondition = !!compiledNode?.gateNode?.approve?.signalId; if (!signalId) { throw new Error('SignalId is empty'); @@ -91,7 +92,9 @@ async function submit( signalId, executionId: nodeExecutionId?.executionId, }, - value: isApprovedCondition ? { scalar: { primitive: { boolean: true } } } : literals['signal'], + value: isApprovedCondition + ? { scalar: { primitive: { boolean: true } } } + : literals['signal'], }); return response; diff --git a/packages/console/src/components/flytegraph/ReactFlow/PausedTasksComponent.tsx b/packages/console/src/components/flytegraph/ReactFlow/PausedTasksComponent.tsx index a9f0d04a9..9e3030ddb 100644 --- a/packages/console/src/components/flytegraph/ReactFlow/PausedTasksComponent.tsx +++ b/packages/console/src/components/flytegraph/ReactFlow/PausedTasksComponent.tsx @@ -35,7 +35,7 @@ export const PausedTasksComponent: React.FC = ({ pausedNodes, initialIsVisible = false, }) => { - const nodeExecutionsById = useContext(NodeExecutionsByIdContext); + const { nodeExecutionsById } = useContext(NodeExecutionsByIdContext); const { compiledWorkflowClosure } = useNodeExecutionContext(); const [isVisible, setIsVisible] = useState(initialIsVisible); const [showResumeForm, setShowResumeForm] = useState(false); @@ -77,6 +77,10 @@ export const PausedTasksComponent: React.FC = ({ compiledWorkflowClosure?.primary.template.nodes ?? [] ).find(node => node.id === selectedNodeId); + const selectedNode = (pausedNodes ?? []).find( + node => node.id === selectedNodeId, + ); + const renderPausedTasksBlock = () => (
= ({
- {compiledNode && selectedNodeId ? ( + {compiledNode && selectedNode ? ( diff --git a/packages/console/src/components/flytegraph/ReactFlow/test/PausedTasksComponent.test.tsx b/packages/console/src/components/flytegraph/ReactFlow/test/PausedTasksComponent.test.tsx index 48c00659f..7b1e6d0d1 100644 --- a/packages/console/src/components/flytegraph/ReactFlow/test/PausedTasksComponent.test.tsx +++ b/packages/console/src/components/flytegraph/ReactFlow/test/PausedTasksComponent.test.tsx @@ -96,7 +96,9 @@ describe('flytegraph > ReactFlow > PausedTasksComponent', () => { compiledWorkflowClosure, }} > - + {} }} + > ,