From b941e62d02fd593de0d4bea79c5a2269496f4c6b Mon Sep 17 00:00:00 2001 From: Frederick Borges Date: Wed, 1 Feb 2023 16:53:29 +0100 Subject: [PATCH] B OpenNebula/one#6106: Show IPv6 on FSunstone (#2474) (cherry picked from commit da30d27e45b858e9c29a3458e49ec857e03deff2) --- .../src/client/components/Cards/NicCard.js | 30 +++++++++++-------- src/fireedge/src/client/constants/vm.js | 7 +++-- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/fireedge/src/client/components/Cards/NicCard.js b/src/fireedge/src/client/components/Cards/NicCard.js index f0fe0414c4..6a49e65585 100644 --- a/src/fireedge/src/client/components/Cards/NicCard.js +++ b/src/fireedge/src/client/components/Cards/NicCard.js @@ -13,30 +13,30 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import { ReactElement, memo, useMemo } from 'react' import PropTypes from 'prop-types' +import { ReactElement, memo, useMemo } from 'react' -import { Network } from 'iconoir-react' import { - useMediaQuery, - Typography, + Accordion, + AccordionDetails, + AccordionSummary, Box, Paper, Stack, - Accordion, - AccordionSummary, - AccordionDetails, + Typography, + useMediaQuery, } from '@mui/material' +import { Network } from 'iconoir-react' -import { rowStyles } from 'client/components/Tables/styles' -import { StatusChip } from 'client/components/Status' import MultipleTags from 'client/components/MultipleTags' +import { StatusChip } from 'client/components/Status' +import { rowStyles } from 'client/components/Tables/styles' import { Translate } from 'client/components/HOC' +import { SecurityGroupRules } from 'client/components/Tabs/Common/RulesSecGroups' +import { Nic, NicAlias, T } from 'client/constants' import { stringToBoolean } from 'client/models/Helper' import { groupBy } from 'client/utils' -import { T, Nic, NicAlias } from 'client/constants' -import { SecurityGroupRules } from 'client/components/Tabs/Common/RulesSecGroups' const NicCard = memo( /** @@ -64,6 +64,9 @@ const NicCard = memo( NIC_ID, NETWORK = '-', IP, + IP6, + IP6_GLOBAL, + IP6_ULA, MAC, PCI_ID, RDP, @@ -97,10 +100,13 @@ const NicCard = memo( () => [ { text: IP, dataCy: `${dataCy}-ip` }, + { text: IP6, dataCy: `${dataCy}-ip6` }, + { text: IP6_GLOBAL, dataCy: `${dataCy}-ip6-global` }, + { text: IP6_ULA, dataCy: `${dataCy}-ip6-ula` }, { text: MAC, dataCy: `${dataCy}-mac` }, { text: ADDRESS, dataCy: `${dataCy}-address` }, ].filter(({ text } = {}) => Boolean(text)), - [IP, MAC, ADDRESS] + [IP, IP6, IP6_GLOBAL, IP6_ULA, MAC, ADDRESS] ) return ( diff --git a/src/fireedge/src/client/constants/vm.js b/src/fireedge/src/client/constants/vm.js index 0904ddacd6..b18763a71f 100644 --- a/src/fireedge/src/client/constants/vm.js +++ b/src/fireedge/src/client/constants/vm.js @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as STATES from 'client/constants/states' +import { T } from 'client/constants' import * as ACTIONS from 'client/constants/actions' import COLOR from 'client/constants/color' +import * as STATES from 'client/constants/states' // eslint-disable-next-line no-unused-vars -import { Permissions, LockInfo } from 'client/constants/common' +import { LockInfo, Permissions } from 'client/constants/common' // eslint-disable-next-line no-unused-vars import { ScheduleAction } from 'client/constants/scheduler' @@ -1964,6 +1965,8 @@ export const NIC_IP_ATTRS = [ 'IP', 'IP6', ['IP6_ULA', 'IP6_GLOBAL'], + 'IP6_GLOBAL', + 'IP6_ULA', 'MAC', ]