diff --git a/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js b/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js index c3963583ae..e00fe5454d 100644 --- a/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js +++ b/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js @@ -38,7 +38,10 @@ const ClustersContent = ({ oneConfig, adminGroup }) => { const clusters = useWatch({ name: TAB_PATH }) const selectedRowIds = - clusters?.reduce((res, id) => ({ ...res, [id]: true }), {}) || {} + Array.isArray(clusters) ? + clusters?.reduce((res, id) => ({ ...res, [id]: true }), {}) + : + {[clusters]: true} const handleSelectedRows = (rows) => { const newValue = rows?.map((row) => row.original.ID) || [] diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js index 2ca055fb13..98579bcd66 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js @@ -254,7 +254,7 @@ const Actions = () => { dialogProps: { title: T.Delete, children: MessageToConfirmAction, - dataCy: `modal-vnet-${VN_TEMPLATE_ACTIONS.DELETE}`, + dataCy: `modal-vnettemplate-${VN_TEMPLATE_ACTIONS.DELETE}`, }, onSubmit: (rows) => async () => { const ids = rows?.map?.(({ original }) => original?.ID) diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js index a76a3ab71a..1de9dd83c7 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js @@ -16,8 +16,8 @@ /* eslint-disable jsdoc/require-jsdoc */ import PropTypes from 'prop-types' -import { User, Group, Lock, Cloud } from 'iconoir-react' import { Typography } from '@mui/material' +import { Cloud, Group, Lock, User } from 'iconoir-react' import { rowStyles } from 'client/components/Tables/styles' @@ -31,7 +31,7 @@ const Row = ({ original, value, ...props }) => { const timeAgo = `registered ${time.toRelative()}` return ( -
+
diff --git a/src/fireedge/src/client/components/Tabs/VNetworkTemplate/Info/information.js b/src/fireedge/src/client/components/Tabs/VNetworkTemplate/Info/information.js index 575ad9348e..a78d0725e9 100644 --- a/src/fireedge/src/client/components/Tabs/VNetworkTemplate/Info/information.js +++ b/src/fireedge/src/client/components/Tabs/VNetworkTemplate/Info/information.js @@ -16,7 +16,7 @@ import { List } from 'client/components/Tabs/Common' import { T, VN_TEMPLATE_ACTIONS, VNetworkTemplate } from 'client/constants' import { useRenameVNTemplateMutation } from 'client/features/OneApi/networkTemplate' -import { booleanToString, stringToBoolean } from 'client/models/Helper' +import { booleanToString, levelLockToString, stringToBoolean } from 'client/models/Helper' import PropTypes from 'prop-types' import { ReactElement } from 'react' @@ -30,7 +30,7 @@ import { ReactElement } from 'react' */ const InformationPanel = ({ vnetTemplate = {}, actions }) => { const [rename] = useRenameVNTemplateMutation() - const { ID, NAME, VLAN_ID_AUTOMATIC, OUTER_VLAN_ID_AUTOMATIC } = vnetTemplate + const { ID, NAME, VLAN_ID_AUTOMATIC, OUTER_VLAN_ID_AUTOMATIC, LOCK } = vnetTemplate const handleRename = async (_, newName) => { await rename({ id: ID, name: newName }) @@ -61,6 +61,11 @@ const InformationPanel = ({ vnetTemplate = {}, actions }) => { value: booleanToString(stringToBoolean(OUTER_VLAN_ID_AUTOMATIC)), dataCy: 'outer_vlan_automatic', }, + { + name: T.Locked, + value: levelLockToString(LOCK?.LOCKED), + dataCy: 'locked', + }, ] return (