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

M #~: Add host driver to VM card (#1850)

(cherry picked from commit 9afe48b28e43702fba58f308efa49a5062498422)
This commit is contained in:
Sergio Betanzos 2022-03-17 14:56:52 +01:00 committed by Tino Vazquez
parent 952cecb74d
commit 710ea8080d
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
2 changed files with 10 additions and 2 deletions

View File

@ -21,9 +21,13 @@ import { Stack, Typography } from '@mui/material'
import Timer from 'client/components/Timer'
import MultipleTags from 'client/components/MultipleTags'
import { StatusCircle } from 'client/components/Status'
import { StatusCircle, StatusChip } from 'client/components/Status'
import { rowStyles } from 'client/components/Tables/styles'
import { getState, getLastHistory } from 'client/models/VirtualMachine'
import {
getState,
getLastHistory,
getHypervisor,
} from 'client/models/VirtualMachine'
import { timeFromMilliseconds } from 'client/models/Helper'
import { VM } from 'client/constants'
@ -39,6 +43,7 @@ const VirtualMachineCard = memo(
const { ID, NAME, UNAME, GNAME, IPS, STIME, ETIME, LOCK } = vm
const HOSTNAME = getLastHistory(vm)?.HOSTNAME ?? '--'
const hypervisor = getHypervisor(vm)
const time = timeFromMilliseconds(+ETIME || +STIME)
const { color: stateColor, name: stateName } = getState(vm)
@ -54,6 +59,7 @@ const VirtualMachineCard = memo(
{NAME}
</Typography>
<span className={classes.labels}>
{hypervisor && <StatusChip text={hypervisor} />}
{LOCK && <Lock data-cy="lock" />}
</span>
</div>

View File

@ -88,6 +88,8 @@ import { ScheduleAction } from 'client/constants/scheduler'
* @property {string} HOSTNAME -
* @property {string|number} HID -
* @property {string|number} CID -
* @property {string} VM_MAD -
* @property {string} TM_MAD -
* @property {string|number} DS_ID -
* @property {VM_ACTIONS} ACTION -
*/