1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #1437: Add hint on the VM snapshot tab (#2220)

This commit is contained in:
Sergio Betanzos 2022-07-05 11:20:50 +02:00 committed by GitHub
parent 26fbcc95e6
commit 2d49985026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 5 deletions

View File

@ -19,6 +19,7 @@ import {
CONFIGURATION_SCHEMA,
FILES_SCHEMA,
} from 'client/components/Forms/VmTemplate/CreateForm/Steps/ExtraConfiguration/context/schema'
import { HYPERVISORS } from 'client/constants'
/**
* @param {object} [formProps] - Form props

View File

@ -15,7 +15,8 @@
* ------------------------------------------------------------------------- */
import { ReactElement, useMemo } from 'react'
import PropTypes from 'prop-types'
import { Stack } from '@mui/material'
import HintIcon from 'iconoir-react/dist/QuestionMarkCircle'
import { Stack, Tooltip } from '@mui/material'
import { useGetVmQuery } from 'client/features/OneApi/vm'
import {
@ -24,6 +25,7 @@ import {
DeleteAction,
} from 'client/components/Tabs/Vm/Snapshot/Actions'
import SnapshotCard from 'client/components/Cards/SnapshotCard'
import { Tr } from 'client/components/HOC'
import {
getSnapshotList,
@ -31,7 +33,7 @@ import {
isAvailableAction,
} from 'client/models/VirtualMachine'
import { getActionsAvailable } from 'client/models/Helper'
import { VM_ACTIONS } from 'client/constants'
import { T, VM_ACTIONS } from 'client/constants'
const { SNAPSHOT_CREATE, SNAPSHOT_REVERT, SNAPSHOT_DELETE } = VM_ACTIONS
@ -59,9 +61,14 @@ const VmSnapshotTab = ({ tabProps: { actions } = {}, id }) => {
return (
<div>
{actionsAvailable?.includes(SNAPSHOT_CREATE) && (
<CreateAction vmId={id} />
)}
<Stack direction="row" gap="1em" alignItems="center">
{actionsAvailable?.includes(SNAPSHOT_CREATE) && (
<CreateAction vmId={id} />
)}
<Tooltip arrow title={Tr(T.VmSnapshotHint)}>
<HintIcon />
</Tooltip>
</Stack>
<Stack gap="1em" py="0.8em" data-cy="snapshots">
{snapshots.map((snapshot) => (

View File

@ -497,6 +497,9 @@ module.exports = {
HostnamePortsForwardedToVmPorts: '%1$s ports %2$s forwarded to VM ports %3$s',
/* VM schema - snapshot */
VmSnapshotNameConcept: 'The new snapshot name. It can be empty',
VmSnapshotHint: `
Snapshots in this tab refer to System Snapshots, which includes all disks and
the memory state of the VM. For disk snapshots, see the Storage tab`,
/* VM schema - actions */
EnforceCapacityChecks: 'Enforce capacity checks',
EnforceCapacityChecksConcept: `