diff --git a/src/fireedge/src/client/components/HOC/InternalLayout/index.js b/src/fireedge/src/client/components/HOC/InternalLayout/index.js index bb64d87588..6eac1cd821 100644 --- a/src/fireedge/src/client/components/HOC/InternalLayout/index.js +++ b/src/fireedge/src/client/components/HOC/InternalLayout/index.js @@ -81,11 +81,7 @@ const InternalLayout = ({ title, disableLayout, children }) => { timeout={300} unmountOnExit > - + {children} diff --git a/src/fireedge/src/client/components/HOC/InternalLayout/styles.js b/src/fireedge/src/client/components/HOC/InternalLayout/styles.js index 04f438911a..ec68d3a6dd 100644 --- a/src/fireedge/src/client/components/HOC/InternalLayout/styles.js +++ b/src/fireedge/src/client/components/HOC/InternalLayout/styles.js @@ -43,9 +43,6 @@ export default makeStyles((theme) => ({ scrollable: { paddingTop: theme.spacing(2), paddingBottom: theme.spacing(2), - [theme.breakpoints.up('xs')]: { - padding: 0, - }, height: '100%', overflow: 'auto', '&::-webkit-scrollbar': { diff --git a/src/fireedge/src/client/components/Tables/styles.js b/src/fireedge/src/client/components/Tables/styles.js index d292618fac..4b77c76477 100644 --- a/src/fireedge/src/client/components/Tables/styles.js +++ b/src/fireedge/src/client/components/Tables/styles.js @@ -26,7 +26,6 @@ export const rowStyles = makeStyles( borderRadius: 6, display: 'flex', gap: 8, - boxShadow: shadows[1], [breakpoints.down('md')]: { flexWrap: 'wrap', }, diff --git a/src/fireedge/src/client/components/Tabs/Host/Vms.js b/src/fireedge/src/client/components/Tabs/Host/Vms.js index cd5d847864..e1ede0d14f 100644 --- a/src/fireedge/src/client/components/Tabs/Host/Vms.js +++ b/src/fireedge/src/client/components/Tabs/Host/Vms.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { ReactElement } from 'react' import PropTypes from 'prop-types' -import { Container, Stack } from '@mui/material' import { useHistory, generatePath } from 'react-router-dom' import { PATH } from 'client/apps/sunstone/routesOne' @@ -41,14 +40,12 @@ const VmsInfoTab = ({ id }) => { } return ( - - handleRowClick(row.ID)} - /> - + handleRowClick(row.ID)} + /> ) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js b/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js index 0c9a3e6cc8..1fe7bfbb7a 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js @@ -15,14 +15,14 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import PropTypes from 'prop-types' -import { Paper, Typography } from '@mui/material' +import { Typography } from '@mui/material' import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' import { ResizeCapacityForm } from 'client/components/Forms/Vm' import { Tr } from 'client/components/HOC' import useCapacityTabStyles from 'client/components/Tabs/Vm/Capacity/styles' -import * as VirtualMachine from 'client/models/VirtualMachine' +import { isVCenter } from 'client/models/VirtualMachine' import { prettyBytes } from 'client/utils' import { T, VM_ACTIONS } from 'client/constants' @@ -30,8 +30,6 @@ const InformationPanel = ({ actions, vm = {}, handleResizeCapacity }) => { const classes = useCapacityTabStyles() const { TEMPLATE } = vm - const isVCenter = VirtualMachine.isVCenter(vm) - const capacity = [ { name: T.PhysicalCpu, @@ -43,7 +41,7 @@ const InformationPanel = ({ actions, vm = {}, handleResizeCapacity }) => { value: TEMPLATE?.VCPU ?? '-', dataCy: 'virtualcpu', }, - isVCenter && { + isVCenter(vm) && { name: T.VirtualCores, value: ( <> @@ -71,7 +69,7 @@ const InformationPanel = ({ actions, vm = {}, handleResizeCapacity }) => { ].filter(Boolean) return ( - +
{actions?.includes?.(VM_ACTIONS.RESIZE_CAPACITY) && ( {
{capacity.map(({ name, value, dataCy }) => (
- + {name} @@ -101,7 +99,7 @@ const InformationPanel = ({ actions, vm = {}, handleResizeCapacity }) => {
))} - +
) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/Capacity/styles.js b/src/fireedge/src/client/components/Tabs/Vm/Capacity/styles.js index e11b8a309e..0061ffa29e 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Capacity/styles.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Capacity/styles.js @@ -17,8 +17,7 @@ import makeStyles from '@mui/styles/makeStyles' export default makeStyles((theme) => ({ root: { - marginBlock: '0.8em', - padding: '1em', + padding: '0.5em', display: 'grid', gap: '1em', gridAutoFlow: 'column', @@ -38,14 +37,11 @@ export default makeStyles((theme) => ({ actions: { [theme.breakpoints.down('md')]: { borderBottom: `1px solid ${theme.palette.divider}`, - padding: '1em', + padding: '0 1em 1em 1em', }, [theme.breakpoints.up('md')]: { order: 1, textAlign: 'end', }, }, - title: { - fontWeight: theme.typography.fontWeightMedium, - }, })) diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/index.js b/src/fireedge/src/client/containers/ApplicationsInstances/index.js index bd63906072..9b0cad8ef3 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/index.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Box } from '@mui/material' +import { Box } from '@mui/material' import { useGetServicesQuery } from 'client/features/OneApi/service' import DialogInfo from 'client/containers/ApplicationsInstances/DialogInfo' @@ -35,7 +35,7 @@ function ApplicationsInstances() { } = useGetServicesQuery() return ( - + <> setShowDialog(false)} /> )} - + ) } diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js index 6a8c45626a..2f0b9a0a5e 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js @@ -16,7 +16,7 @@ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' import { useHistory, generatePath } from 'react-router-dom' -import { Container, Box } from '@mui/material' +import { Box } from '@mui/material' import { PATH } from 'client/apps/sunstone/routesFlow' import { useGetServiceTemplatesQuery } from 'client/features/OneApi/serviceTemplate' @@ -38,7 +38,7 @@ function ApplicationsTemplates() { } = useGetServiceTemplatesQuery() return ( - + <> setShowDialog(false)} /> )} - + ) } diff --git a/src/fireedge/src/client/containers/Clusters/Detail.js b/src/fireedge/src/client/containers/Clusters/Detail.js index 7f4e6d32a8..0af504b80f 100644 --- a/src/fireedge/src/client/containers/Clusters/Detail.js +++ b/src/fireedge/src/client/containers/Clusters/Detail.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useParams, Redirect } from 'react-router-dom' -import { Container, Box } from '@mui/material' import ClusterTabs from 'client/components/Tabs/Cluster' @@ -26,17 +25,7 @@ function ClusterDetail() { return } - return ( - - {} - - ) + return } export default ClusterDetail diff --git a/src/fireedge/src/client/containers/Clusters/index.js b/src/fireedge/src/client/containers/Clusters/index.js index e37bd13468..f208d0470f 100644 --- a/src/fireedge/src/client/containers/Clusters/index.js +++ b/src/fireedge/src/client/containers/Clusters/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { ClustersTable } from 'client/components/Tables' import ClusterTabs from 'client/components/Tabs/Cluster' @@ -26,40 +26,33 @@ function Clusters() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Dashboard/Provision/index.js b/src/fireedge/src/client/containers/Dashboard/Provision/index.js index 3a06e14579..59cbd441d3 100644 --- a/src/fireedge/src/client/containers/Dashboard/Provision/index.js +++ b/src/fireedge/src/client/containers/Dashboard/Provision/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ import { memo, ReactElement } from 'react' import PropTypes from 'prop-types' -import { Container, Box, Grid, CircularProgress } from '@mui/material' +import { Box, Grid, CircularProgress } from '@mui/material' import { Server as ClusterIcon, HardDrive as HostIcon, @@ -40,8 +40,8 @@ function ProvisionDashboard() { const { settings: { DISABLE_ANIMATIONS } = {} } = useAuth() return ( - - - - - - - - - - - - - - - + + + + + + - - + + + + + + + + ) } diff --git a/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js b/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js index d05125b91c..e622c3138f 100644 --- a/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js +++ b/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ import { memo, ReactElement } from 'react' import PropTypes from 'prop-types' -import { Container, Box, CircularProgress, Grid } from '@mui/material' +import { Box, CircularProgress, Grid } from '@mui/material' import { ModernTv as VmsIcons, List as TemplatesIcon, @@ -38,8 +38,8 @@ function SunstoneDashboard() { const { settings: { DISABLE_ANIMATIONS } = {} } = useAuth() return ( - - - - - - - - - - + + + + + + + ) } diff --git a/src/fireedge/src/client/containers/Datastores/index.js b/src/fireedge/src/client/containers/Datastores/index.js index 786e74426d..54ef1b5fb9 100644 --- a/src/fireedge/src/client/containers/Datastores/index.js +++ b/src/fireedge/src/client/containers/Datastores/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { DatastoresTable } from 'client/components/Tables' import DatastoreTabs from 'client/components/Tabs/Datastore' @@ -26,40 +26,33 @@ function Datastores() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Groups/Detail.js b/src/fireedge/src/client/containers/Groups/Detail.js index 8394c2348a..72ac87f054 100644 --- a/src/fireedge/src/client/containers/Groups/Detail.js +++ b/src/fireedge/src/client/containers/Groups/Detail.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useParams, Redirect } from 'react-router-dom' -import { Container, Box } from '@mui/material' // import GroupTabs from 'client/components/Tabs/Group' @@ -27,16 +26,10 @@ function GroupDetail() { } return ( - + <> {/* */} {id} - + ) } diff --git a/src/fireedge/src/client/containers/Groups/index.js b/src/fireedge/src/client/containers/Groups/index.js index b72e4bcf8c..93e03d85e9 100644 --- a/src/fireedge/src/client/containers/Groups/index.js +++ b/src/fireedge/src/client/containers/Groups/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { GroupsTable } from 'client/components/Tables' import GroupTabs from 'client/components/Tabs/Group' @@ -26,40 +26,33 @@ function Groups() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Hosts/Create.js b/src/fireedge/src/client/containers/Hosts/Create.js index 93e4122d36..f3b884ad6d 100644 --- a/src/fireedge/src/client/containers/Hosts/Create.js +++ b/src/fireedge/src/client/containers/Hosts/Create.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { ReactElement } from 'react' import { useHistory, useLocation } from 'react-router' -import { Container } from '@mui/material' import { useGeneralApi } from 'client/features/General' import { @@ -58,11 +57,9 @@ function CreateHost() { } return ( - - }> - {(config) => } - - + }> + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/Hosts/Detail.js b/src/fireedge/src/client/containers/Hosts/Detail.js index b3442e48ea..8854004dd1 100644 --- a/src/fireedge/src/client/containers/Hosts/Detail.js +++ b/src/fireedge/src/client/containers/Hosts/Detail.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useParams, Redirect } from 'react-router-dom' -import { Container, Box } from '@mui/material' import HostTabs from 'client/components/Tabs/Host' @@ -26,17 +25,7 @@ function HostDetail() { return } - return ( - - - - ) + return } export default HostDetail diff --git a/src/fireedge/src/client/containers/Hosts/index.js b/src/fireedge/src/client/containers/Hosts/index.js index 8b832d2df6..03a69f6965 100644 --- a/src/fireedge/src/client/containers/Hosts/index.js +++ b/src/fireedge/src/client/containers/Hosts/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { HostsTable } from 'client/components/Tables' import HostTabs from 'client/components/Tabs/Host' @@ -28,43 +28,36 @@ function Hosts() { const actions = HostActions() return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Images/index.js b/src/fireedge/src/client/containers/Images/index.js index 9332bf4ba1..fba5db1e9c 100644 --- a/src/fireedge/src/client/containers/Images/index.js +++ b/src/fireedge/src/client/containers/Images/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { ImagesTable } from 'client/components/Tables' import ImageTabs from 'client/components/Tabs/Image' @@ -26,40 +26,33 @@ function Images() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/MarketplaceApps/Create.js b/src/fireedge/src/client/containers/MarketplaceApps/Create.js index db90e29cb4..1704399c48 100644 --- a/src/fireedge/src/client/containers/MarketplaceApps/Create.js +++ b/src/fireedge/src/client/containers/MarketplaceApps/Create.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { ReactElement } from 'react' import { useHistory, useLocation } from 'react-router' -import { Container } from '@mui/material' import { useGeneralApi } from 'client/features/General' import { @@ -65,15 +64,13 @@ function CreateMarketplaceApp() { } return ( - - } - > - {(config) => } - - + } + > + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/MarketplaceApps/index.js b/src/fireedge/src/client/containers/MarketplaceApps/index.js index 570e8faeb0..e511c387e4 100644 --- a/src/fireedge/src/client/containers/MarketplaceApps/index.js +++ b/src/fireedge/src/client/containers/MarketplaceApps/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ import { useState, JSXElementConstructor } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { MarketplaceAppsTable } from 'client/components/Tables' import MarketplaceAppActions from 'client/components/Tables/MarketplaceApps/actions' @@ -32,43 +32,36 @@ function MarketplaceApps() { const actions = MarketplaceAppActions() return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Marketplaces/index.js b/src/fireedge/src/client/containers/Marketplaces/index.js index b9dd2c8380..ed93c6cdcf 100644 --- a/src/fireedge/src/client/containers/Marketplaces/index.js +++ b/src/fireedge/src/client/containers/Marketplaces/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { MarketplacesTable } from 'client/components/Tables' import MarketplaceTabs from 'client/components/Tabs/Marketplace' @@ -26,40 +26,33 @@ function Marketplaces() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Providers/Create.js b/src/fireedge/src/client/containers/Providers/Create.js index cf5007eff9..d1fd2d0934 100644 --- a/src/fireedge/src/client/containers/Providers/Create.js +++ b/src/fireedge/src/client/containers/Providers/Create.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { useEffect, ReactElement } from 'react' import { useParams, useHistory, Redirect } from 'react-router' -import { Container } from '@mui/material' import { useGeneralApi } from 'client/features/General' import { @@ -118,21 +117,17 @@ function ProviderCreateForm() { } } - return ( - - {id && (!providerConfig || !connection || !provider) ? ( - - ) : ( - } - > - {(config) => } - - )} - + return id && (!providerConfig || !connection || !provider) ? ( + + ) : ( + } + > + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/Providers/index.js b/src/fireedge/src/client/containers/Providers/index.js index 96b93c15c3..7904518c7f 100644 --- a/src/fireedge/src/client/containers/Providers/index.js +++ b/src/fireedge/src/client/containers/Providers/index.js @@ -17,7 +17,7 @@ import { memo, ReactElement, useEffect } from 'react' import PropTypes from 'prop-types' import { useHistory, generatePath } from 'react-router-dom' -import { Container, Box, Backdrop, CircularProgress } from '@mui/material' +import { Box, Backdrop, CircularProgress } from '@mui/material' import { Trash as DeleteIcon, Settings as EditIcon } from 'iconoir-react' import { @@ -74,64 +74,60 @@ function Providers() { return ( <> - - refetch(), - isSubmitting: isFetching, - }} - addButtonProps={{ - 'data-cy': 'create-provider', - onClick: () => history.push(PATH.PROVIDERS.CREATE), - }} - searchProps={{ handleChange }} - /> - - {error ? ( - {T.CannotConnectOneProvision} - ) : ( - ({ - image: providerConfig[TEMPLATE?.PLAIN?.provider]?.image, - isProvider: true, - handleClick: () => show({ id: ID, title: `#${ID} ${NAME}` }), - actions: [ - { - handleClick: () => - history.push( - generatePath(PATH.PROVIDERS.EDIT, { id: ID }) + refetch(), + isSubmitting: isFetching, + }} + addButtonProps={{ + 'data-cy': 'create-provider', + onClick: () => history.push(PATH.PROVIDERS.CREATE), + }} + searchProps={{ handleChange }} + /> + + {error ? ( + {T.CannotConnectOneProvision} + ) : ( + ({ + image: providerConfig[TEMPLATE?.PLAIN?.provider]?.image, + isProvider: true, + handleClick: () => show({ id: ID, title: `#${ID} ${NAME}` }), + actions: [ + { + handleClick: () => + history.push(generatePath(PATH.PROVIDERS.EDIT, { id: ID })), + icon: , + cy: 'provider-edit', + }, + { + handleClick: () => + show({ + id: ID, + title: ( + ), - icon: , - cy: 'provider-edit', - }, - { - handleClick: () => - show({ - id: ID, - title: ( - - ), - handleAccept: () => handleDelete(ID), - }), - icon: , - isSubmitting: isDeleting, - color: 'error', - cy: 'provider-delete', - }, - ], - })} - /> - )} - - + handleAccept: () => handleDelete(ID), + }), + icon: , + isSubmitting: isDeleting, + color: 'error', + cy: 'provider-delete', + }, + ], + })} + /> + )} + {display && dialogProps?.id && ( } - return ( - - {!providers || isLoading ? ( - - ) : ( - }> - {(config) => } - - )} - + return !providers || isLoading ? ( + + ) : ( + }> + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/Provisions/index.js b/src/fireedge/src/client/containers/Provisions/index.js index e167c2eb5b..5bfee62174 100644 --- a/src/fireedge/src/client/containers/Provisions/index.js +++ b/src/fireedge/src/client/containers/Provisions/index.js @@ -16,7 +16,7 @@ import { ReactElement } from 'react' import { useHistory } from 'react-router-dom' -import { Container, Box, Backdrop, CircularProgress } from '@mui/material' +import { Box, Backdrop, CircularProgress } from '@mui/material' import { Trash as DeleteIcon, Settings as EditIcon } from 'iconoir-react' import { @@ -81,73 +81,71 @@ function Provisions() { return ( <> - - refetch(), - isSubmitting: isFetching, - }} - addButtonProps={{ - 'data-cy': 'create-provision', - onClick: () => history.push(PATH.PROVISIONS.CREATE), - }} - searchProps={{ handleChange }} - /> - - {error ? ( - {T.CannotConnectOneProvision} - ) : ( - ({ - handleClick: () => handleClickfn(ID, NAME), - actions: [ + refetch(), + isSubmitting: isFetching, + }} + addButtonProps={{ + 'data-cy': 'create-provision', + onClick: () => history.push(PATH.PROVISIONS.CREATE), + }} + searchProps={{ handleChange }} + /> + + {error ? ( + {T.CannotConnectOneProvision} + ) : ( + ({ + handleClick: () => handleClickfn(ID, NAME), + actions: [ + { + handleClick: async () => { + await configureProvision({ id: ID }) + enqueueInfo(`Configuring provision - ID: ${ID}`) + }, + icon: , + cy: 'provision-configure', + }, + ], + deleteAction: { + buttonProps: { + 'data-cy': 'provision-delete', + icon: , + color: 'error', + }, + options: [ { - handleClick: async () => { - await configureProvision({ id: ID }) - enqueueInfo(`Configuring provision - ID: ${ID}`) + dialogProps: { + title: ( + + ), + }, + form: DeleteForm, + onSubmit: async (formData) => { + try { + await deleteProvision({ id: ID, ...formData }) + enqueueInfo(`Deleting provision - ID: ${ID}`) + } finally { + hide() + } }, - icon: , - cy: 'provision-configure', }, ], - deleteAction: { - buttonProps: { - 'data-cy': 'provision-delete', - icon: , - color: 'error', - }, - options: [ - { - dialogProps: { - title: ( - - ), - }, - form: DeleteForm, - onSubmit: async (formData) => { - try { - await deleteProvision({ id: ID, ...formData }) - enqueueInfo(`Deleting provision - ID: ${ID}`) - } finally { - hide() - } - }, - }, - ], - }, - })} - /> - )} - - + }, + })} + /> + )} + {display && !provisionError && (provisionDetail?.ID !== originalArgs || provisionIsLoading ? ( diff --git a/src/fireedge/src/client/containers/Settings/index.js b/src/fireedge/src/client/containers/Settings/index.js index 0663030d6b..eb53ac1f5c 100644 --- a/src/fireedge/src/client/containers/Settings/index.js +++ b/src/fireedge/src/client/containers/Settings/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ import { ReactElement } from 'react' -import { Container, Typography, Divider, Stack } from '@mui/material' +import { Typography, Divider, Stack } from '@mui/material' import { Translate } from 'client/components/HOC' import { T } from 'client/constants' @@ -24,7 +24,7 @@ import AuthenticationSection from 'client/containers/Settings/Authentication' /** @returns {ReactElement} Settings container */ const Settings = () => ( - + <> @@ -35,7 +35,7 @@ const Settings = () => ( - + ) export default Settings diff --git a/src/fireedge/src/client/containers/TestApi/index.js b/src/fireedge/src/client/containers/TestApi/index.js index 15e93a468a..253005bfbc 100644 --- a/src/fireedge/src/client/containers/TestApi/index.js +++ b/src/fireedge/src/client/containers/TestApi/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ import { useState, useMemo, JSXElementConstructor } from 'react' -import { Container, TextField, Autocomplete, Grid, Box } from '@mui/material' +import { TextField, Autocomplete, Grid, Box } from '@mui/material' import ResponseForm from 'client/containers/TestApi/ResponseForm' import { InputCode } from 'client/components/FormControl' @@ -40,36 +40,31 @@ function TestApi() { const handleChangeResponse = (res) => setResponse(res) return ( - - - - COMMANDS, [])} - value={name} - onChange={handleChangeCommand} - renderInput={(params) => ( - - )} - /> - {name && name !== '' && ( - + + + COMMANDS, [])} + value={name} + onChange={handleChangeCommand} + renderInput={(params) => ( + )} - - - - - - + /> + {name && name !== '' && ( + + )} - + + + + + + ) } diff --git a/src/fireedge/src/client/containers/TestForm/index.js b/src/fireedge/src/client/containers/TestForm/index.js index 05abce53b2..f6b04e3d34 100644 --- a/src/fireedge/src/client/containers/TestForm/index.js +++ b/src/fireedge/src/client/containers/TestForm/index.js @@ -13,8 +13,8 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import { useMemo, JSXElementConstructor } from 'react' -import { Container, Grid, Button } from '@mui/material' +import { useMemo, ReactElement } from 'react' +import { Grid, Button } from '@mui/material' import { useForm, FormProvider } from 'react-hook-form' import { object } from 'yup' import { yupResolver } from '@hookform/resolvers/yup' @@ -22,8 +22,8 @@ import { yupResolver } from '@hookform/resolvers/yup' import { FormWithSchema } from 'client/components/Forms' /** - * @returns {JSXElementConstructor} - * - Component that allows you to test a form and their components + * @returns {ReactElement} + * Component that allows you to test a form and their components */ function TestForm() { const fields = useMemo( @@ -45,20 +45,24 @@ function TestForm() { } return ( - - - - - - - - - - + + + + + - + + + + ) } diff --git a/src/fireedge/src/client/containers/Users/Detail.js b/src/fireedge/src/client/containers/Users/Detail.js index 4679f55186..ed8ca3333b 100644 --- a/src/fireedge/src/client/containers/Users/Detail.js +++ b/src/fireedge/src/client/containers/Users/Detail.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useParams, Redirect } from 'react-router-dom' -import { Container, Box } from '@mui/material' import UserTabs from 'client/components/Tabs/User' @@ -26,17 +25,7 @@ function UserDetail() { return } - return ( - - - - ) + return } export default UserDetail diff --git a/src/fireedge/src/client/containers/Users/index.js b/src/fireedge/src/client/containers/Users/index.js index 1cccc098be..32d6b5e809 100644 --- a/src/fireedge/src/client/containers/Users/index.js +++ b/src/fireedge/src/client/containers/Users/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { UsersTable } from 'client/components/Tables' import UserTabs from 'client/components/Tabs/User' @@ -26,40 +26,33 @@ function Users() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/VNetworkTemplates/index.js b/src/fireedge/src/client/containers/VNetworkTemplates/index.js index 74ebb9feb1..c17add82fb 100644 --- a/src/fireedge/src/client/containers/VNetworkTemplates/index.js +++ b/src/fireedge/src/client/containers/VNetworkTemplates/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { VNetworkTemplatesTable } from 'client/components/Tables' import VNetworkTemplateTabs from 'client/components/Tabs/VNetworkTemplate' @@ -26,40 +26,33 @@ function VNetworkTemplates() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/VirtualMachines/Detail.js b/src/fireedge/src/client/containers/VirtualMachines/Detail.js index c183478f35..647a6661be 100644 --- a/src/fireedge/src/client/containers/VirtualMachines/Detail.js +++ b/src/fireedge/src/client/containers/VirtualMachines/Detail.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useParams, Redirect } from 'react-router-dom' -import { Container, Box } from '@mui/material' import VmTabs from 'client/components/Tabs/Vm' @@ -26,17 +25,7 @@ function VirtualMachineDetail() { return } - return ( - - - - ) + return } export default VirtualMachineDetail diff --git a/src/fireedge/src/client/containers/VirtualMachines/index.js b/src/fireedge/src/client/containers/VirtualMachines/index.js index fe41821f9c..fd3567e993 100644 --- a/src/fireedge/src/client/containers/VirtualMachines/index.js +++ b/src/fireedge/src/client/containers/VirtualMachines/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { VmsTable } from 'client/components/Tables' import VmActions from 'client/components/Tables/Vms/actions' @@ -28,43 +28,36 @@ function VirtualMachines() { const actions = VmActions() return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/VirtualNetworks/index.js b/src/fireedge/src/client/containers/VirtualNetworks/index.js index 2de24948f1..631417113f 100644 --- a/src/fireedge/src/client/containers/VirtualNetworks/index.js +++ b/src/fireedge/src/client/containers/VirtualNetworks/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { VNetworksTable } from 'client/components/Tables' import VNetworkTabs from 'client/components/Tabs/VNetwork' @@ -26,40 +26,33 @@ function VirtualNetworks() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/VirtualRouters/index.js b/src/fireedge/src/client/containers/VirtualRouters/index.js index f3f0bcb9c4..84860185c4 100644 --- a/src/fireedge/src/client/containers/VirtualRouters/index.js +++ b/src/fireedge/src/client/containers/VirtualRouters/index.js @@ -15,23 +15,10 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import { Container, Box } from '@mui/material' - import { VRoutersTable } from 'client/components/Tables' function VirtualRouters() { - return ( - - - - ) + return } export default VirtualRouters diff --git a/src/fireedge/src/client/containers/VmTemplates/Create.js b/src/fireedge/src/client/containers/VmTemplates/Create.js index aa10ee7cf5..50102852d0 100644 --- a/src/fireedge/src/client/containers/VmTemplates/Create.js +++ b/src/fireedge/src/client/containers/VmTemplates/Create.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { useEffect, ReactElement } from 'react' import { useHistory, useLocation } from 'react-router' -import { Container } from '@mui/material' import { useGeneralApi } from 'client/features/General' import { @@ -75,21 +74,17 @@ function CreateVmTemplate() { templateId && getTemplate({ id: templateId, extended: true }) }, []) - return ( - - {templateId && !data ? ( - - ) : ( - } - > - {(config) => } - - )} - + return templateId && !data ? ( + + ) : ( + } + > + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/VmTemplates/Instantiate.js b/src/fireedge/src/client/containers/VmTemplates/Instantiate.js index 1fe9b8f0d9..72df8759e0 100644 --- a/src/fireedge/src/client/containers/VmTemplates/Instantiate.js +++ b/src/fireedge/src/client/containers/VmTemplates/Instantiate.js @@ -15,7 +15,6 @@ * ------------------------------------------------------------------------- */ import { ReactElement } from 'react' import { useHistory, useLocation, Redirect } from 'react-router' -import { Container } from '@mui/material' import { useGeneralApi } from 'client/features/General' import { @@ -70,21 +69,17 @@ function InstantiateVmTemplate() { return } - return ( - - {!data ? ( - - ) : ( - } - > - {(config) => } - - )} - + return !data ? ( + + ) : ( + } + > + {(config) => } + ) } diff --git a/src/fireedge/src/client/containers/VmTemplates/index.js b/src/fireedge/src/client/containers/VmTemplates/index.js index c0c948ce98..42e8d4858a 100644 --- a/src/fireedge/src/client/containers/VmTemplates/index.js +++ b/src/fireedge/src/client/containers/VmTemplates/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { VmTemplatesTable } from 'client/components/Tables' import VmTemplateActions from 'client/components/Tables/VmTemplates/actions' @@ -28,43 +28,36 @@ function VmTemplates() { const actions = VmTemplateActions() return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/containers/Zones/index.js b/src/fireedge/src/client/containers/Zones/index.js index b39c0c0227..bcae20efb0 100644 --- a/src/fireedge/src/client/containers/Zones/index.js +++ b/src/fireedge/src/client/containers/Zones/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { useState } from 'react' -import { Container, Stack, Chip } from '@mui/material' +import { Stack, Chip } from '@mui/material' import { ZonesTable } from 'client/components/Tables' import ZoneTabs from 'client/components/Tabs/Zone' @@ -26,40 +26,33 @@ function Zones() { const [selectedRows, onSelectedRowsChange] = useState(() => []) return ( - - - + + - {selectedRows?.length > 0 && ( - - {selectedRows?.length === 1 ? ( - - ) : ( - - ( - toggleRowSelected(false)} - /> - ) - )} - /> - - )} - - )} - - + {selectedRows?.length > 0 && ( + + {selectedRows?.length === 1 ? ( + + ) : ( + + ( + toggleRowSelected(false)} + /> + ) + )} + /> + + )} + + )} + ) } diff --git a/src/fireedge/src/client/theme/defaults.js b/src/fireedge/src/client/theme/defaults.js index f0874ed8c4..6dcdf0588e 100644 --- a/src/fireedge/src/client/theme/defaults.js +++ b/src/fireedge/src/client/theme/defaults.js @@ -408,7 +408,7 @@ export default (appTheme, mode = SCHEMES.DARK) => { textTransform: 'capitalize', fontSize: '1rem', '&.Mui-selected': { - color: secondary.main, + color: isDarkMode ? secondary.main : 'text.primary', }, }, },