From 73a273f0f6480a93d7d285b5a4ad1129ec687723 Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Wed, 6 Nov 2024 16:37:25 +0300 Subject: [PATCH] fix(NodeEndpointsTooltipContent): change fields order --- .../NodeEndpointsTooltipContent.tsx | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.tsx b/src/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.tsx index 49411f1a9..bdf3ae935 100644 --- a/src/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.tsx +++ b/src/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.tsx @@ -21,14 +21,15 @@ interface NodeEdpointsTooltipProps { export const NodeEndpointsTooltipContent = ({data, nodeHref}: NodeEdpointsTooltipProps) => { const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges); const info: (DefinitionListItemProps & {key: string})[] = []; - if (data?.Host) { + + if (data?.Roles?.length) { info.push({ - name: i18n('field_host'), - children: data.Host, - copyText: data.Host, - key: 'Host', + name: i18n('field_roles'), + children: data.Roles.join(', '), + key: 'Roles', }); } + if (data?.Tenants?.[0]) { info.push({ name: i18n('field_database'), @@ -36,11 +37,13 @@ export const NodeEndpointsTooltipContent = ({data, nodeHref}: NodeEdpointsToolti key: 'Database', }); } - if (data?.Roles?.length) { + + if (data?.Host) { info.push({ - name: i18n('field_roles'), - children: data.Roles.join(', '), - key: 'Roles', + name: i18n('field_host'), + children: data.Host, + copyText: data.Host, + key: 'Host', }); }