From 3c5d6e86de10c103054d974dfb95883bbae0796a Mon Sep 17 00:00:00 2001 From: james-union <105876962+james-union@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:25:11 -0500 Subject: [PATCH] Add version bump for ApproveCondition PR (#691) * fix: add version bump Signed-off-by: James * fix: pausedTaskComponent test Signed-off-by: James --------- Signed-off-by: James --- packages/console/package.json | 2 +- .../components/Launch/LaunchForm/useResumeFormState.ts | 7 +++++-- .../flytegraph/ReactFlow/PausedTasksComponent.tsx | 10 +++++++--- .../ReactFlow/test/PausedTasksComponent.test.tsx | 4 +++- 4 files changed, 16 insertions(+), 7 deletions(-) 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", 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, }} > - + {} }} + > ,