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

(cherry picked from commit 9afe48b28e)
This commit is contained in:
Sergio Betanzos authored and Tino Vazquez committed 2022-03-17 14:58:53 +01:00
1 parent 952cecb74d
commit 710ea8080d
2 files changed
+10 -2

No files matched your search

@@ -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>
+2
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 -
*/