From aaba117a43f685f388416e3ca2d1e89cf85a7af4 Mon Sep 17 00:00:00 2001 From: yaacov Date: Wed, 29 May 2024 12:49:04 +0300 Subject: [PATCH] Hide empty conditions sections Signed-off-by: yaacov --- .../MigrationVirtualMachinesRowExtended.tsx | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 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 b12e82db1..ab63c088c 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 @@ -156,34 +156,38 @@ export const MigrationVirtualMachinesRowExtended: React.FC> = ( )} - - - - - {t('Type')} - {t('Status')} - {t('Updated')} - {t('Reason')} - {t('Message')} - - - - {(conditions || []).map((condition) => ( - - {condition.type} - {getStatusLabel(condition.status)} - - - - {condition.reason} - {condition?.message || '-'} - - ))} - - + {(conditions || []).length > 0 && ( + <> + + + + + {t('Type')} + {t('Status')} + {t('Updated')} + {t('Reason')} + {t('Message')} + + + + {(conditions || []).map((condition) => ( + + {condition.type} + {getStatusLabel(condition.status)} + + + + {condition.reason} + {condition?.message || '-'} + + ))} + + + + )}