diff --git a/src/fireedge/src/client/components/Cards/ImageCreateCard.js b/src/fireedge/src/client/components/Cards/ImageCreateCard.js index e6020862be..7312f69ca4 100644 --- a/src/fireedge/src/client/components/Cards/ImageCreateCard.js +++ b/src/fireedge/src/client/components/Cards/ImageCreateCard.js @@ -66,7 +66,7 @@ const ImageCreateCard = memo( const classes = useStyles() return ( - + {Icon && ( diff --git a/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/AdvancedOptions/index.js b/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/AdvancedOptions/index.js index 9ee4cf03b1..cf211cbe66 100644 --- a/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/AdvancedOptions/index.js +++ b/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/AdvancedOptions/index.js @@ -23,7 +23,9 @@ import { T } from 'client/constants' export const STEP_ID = 'advanced' -const Content = () => +const Content = () => ( + +) /** * Advanced options create image. diff --git a/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/General/index.js b/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/General/index.js index c97b358039..11a9557113 100644 --- a/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/General/index.js +++ b/src/fireedge/src/client/components/Forms/Image/CreateForm/Steps/General/index.js @@ -24,7 +24,9 @@ import { T } from 'client/constants' export const STEP_ID = 'general' -const Content = () => +const Content = () => ( + +) /** * General configuration about VM Template. diff --git a/src/fireedge/src/client/components/Tables/Images/columns.js b/src/fireedge/src/client/components/Tables/Images/columns.js index 1b9cbd6fb9..6520cc6ea0 100644 --- a/src/fireedge/src/client/components/Tables/Images/columns.js +++ b/src/fireedge/src/client/components/Tables/Images/columns.js @@ -25,6 +25,7 @@ export default [ { Header: 'Name', accessor: 'NAME' }, { Header: 'Owner', accessor: 'UNAME' }, { Header: 'Group', accessor: 'GNAME' }, + { Header: 'Locked', id: 'locked', accessor: 'LOCK' }, { Header: 'State', id: 'STATE', diff --git a/src/fireedge/src/client/components/Tables/Images/row.js b/src/fireedge/src/client/components/Tables/Images/row.js index 42e70263cb..c760f48e98 100644 --- a/src/fireedge/src/client/components/Tables/Images/row.js +++ b/src/fireedge/src/client/components/Tables/Images/row.js @@ -36,7 +36,7 @@ const Row = ({ original, value, ...props }) => { TYPE, DISK_TYPE, PERSISTENT, - LOCK, + locked, DATASTORE, TOTAL_VMS, RUNNING_VMS, @@ -59,7 +59,7 @@ const Row = ({ original, value, ...props }) => { {NAME} - {LOCK && } + {locked && } {labels.map((label) => ( diff --git a/src/fireedge/src/client/components/Tabs/Image/Info/information.js b/src/fireedge/src/client/components/Tabs/Image/Info/information.js index e775031ccb..10369ad68b 100644 --- a/src/fireedge/src/client/components/Tabs/Image/Info/information.js +++ b/src/fireedge/src/client/components/Tabs/Image/Info/information.js @@ -26,7 +26,11 @@ import { StatusChip } from 'client/components/Status' import { List } from 'client/components/Tabs/Common' import { getType, getState } from 'client/models/Image' -import { timeToString, booleanToString } from 'client/models/Helper' +import { + timeToString, + booleanToString, + levelLockToString, +} from 'client/models/Helper' import { arrayToOptions, prettyBytes } from 'client/utils' import { T, Image, IMAGE_ACTIONS, IMAGE_TYPES } from 'client/constants' import { PATH } from 'client/apps/sunstone/routesOne' @@ -49,6 +53,7 @@ const InformationPanel = ({ image = {}, actions }) => { NAME, SIZE, PERSISTENT, + LOCK, REGTIME, DATASTORE_ID, DATASTORE = '--', @@ -110,6 +115,11 @@ const InformationPanel = ({ image = {}, actions }) => { handleEdit: handleChangeType, dataCy: 'type', }, + { + name: T.Locked, + value: levelLockToString(LOCK?.LOCKED), + dataCy: 'locked', + }, { name: T.Persistent, value: booleanToString(+PERSISTENT), @@ -127,6 +137,7 @@ const InformationPanel = ({ image = {}, actions }) => { { name: T.State, value: , + dataCy: 'state', }, { name: T.RunningVMs, diff --git a/src/fireedge/src/client/features/OneApi/image.js b/src/fireedge/src/client/features/OneApi/image.js index 74801138da..2fbcfc9efb 100644 --- a/src/fireedge/src/client/features/OneApi/image.js +++ b/src/fireedge/src/client/features/OneApi/image.js @@ -27,6 +27,7 @@ import { Permission, IMAGE_TYPES_STR, } from 'client/constants' +import { getType } from 'client/models/Image' const { IMAGE } = ONE_RESOURCES const { IMAGE_POOL } = ONE_RESOURCES_POOL @@ -50,7 +51,19 @@ const imageApi = oneApi.injectEndpoints({ return { params, command } }, - transformResponse: (data) => [data?.IMAGE_POOL?.IMAGE ?? []].flat(), + transformResponse: (data) => { + const images = data?.IMAGE_POOL?.IMAGE?.filter?.((image) => { + const type = getType(image) + + return ( + type === IMAGE_TYPES_STR.OS || + type === IMAGE_TYPES_STR.CDROM || + type === IMAGE_TYPES_STR.DATABLOCK + ) + }) + + return [images ?? []].flat() + }, providesTags: (images) => images ? [