From fbf5da60319020edd64221280a5654493290a37a Mon Sep 17 00:00:00 2001 From: Yaacov Zamir Date: Thu, 21 Mar 2024 11:56:33 +0200 Subject: [PATCH] show vm link in vm list if vm created Signed-off-by: Yaacov Zamir --- .../Migration/MigrationVirtualMachinesRowExtended.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/Migration/MigrationVirtualMachinesRowExtended.tsx b/packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/Migration/MigrationVirtualMachinesRowExtended.tsx index bc23e0565..2aafdded6 100644 --- a/packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/Migration/MigrationVirtualMachinesRowExtended.tsx +++ b/packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/Migration/MigrationVirtualMachinesRowExtended.tsx @@ -22,7 +22,9 @@ export const MigrationVirtualMachinesRowExtended: React.FC> = ( const conditions = props.resourceData.statusVM?.conditions; const pods = props.resourceData.pods; const jobs = props.resourceData.jobs; - const success = conditions?.find((c) => c.type === 'Succeeded' && c.status === 'True'); + const vmCreated = pipeline.find( + (p) => p?.name === 'VirtualMachineCreation' && p?.phase === 'Completed', + ); const getStatusLabel = (status: string) => { switch (status) { @@ -37,7 +39,7 @@ export const MigrationVirtualMachinesRowExtended: React.FC> = ( return ( - {success && ( + {vmCreated && ( <>