diff --git a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js index 23cd89976a..b5520e0f9a 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js @@ -16,7 +16,15 @@ import { ReactElement, useMemo } from 'react' import PropTypes from 'prop-types' import HintIcon from 'iconoir-react/dist/QuestionMarkCircle' -import { Stack, Tooltip } from '@mui/material' +import { + Stack, + Tooltip, + Typography, + Box, + List, + ListItem, + ListItemText, +} from '@mui/material' import { useGetVmQuery } from 'client/features/OneApi/vm' import { @@ -59,31 +67,105 @@ const VmSnapshotTab = ({ tabProps: { actions } = {}, id }) => { return [getSnapshotList(vm), actionsByState] }, [vm]) - return ( -
- - {actionsAvailable?.includes(SNAPSHOT_CREATE) && ( - - )} - - - - + const isSnapshotSupported = !actionsAvailable?.includes(SNAPSHOT_CREATE) - - {snapshots.map((snapshot) => ( - - ))} - -
+ return ( + + {isSnapshotSupported ? ( + + {snapshots.length >= 0 && ( + + + + )} + + + ) : ( + + + + + Taking snapshots is not available. + + + + + + + + + + + If none of the above worked, please refer to the VM monitoring + logs. + + + + + )} + {snapshots.length <= 0 ? ( + + + + {Tr(T.VmSnapshotHint)} + + + + ) : ( + + + {snapshots.map((snapshot) => ( + + ))} + + + )} + ) }