mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-04 14:12:01 +09:00
B #~: Show correct text on LCM_INIT state (FSunstone) (#2372)
This commit is contained in:
1 parent
e9a30cc6a1
commit
f9fc65becc
5 files changed
+30
-6
No files matched your search
@@ -81,7 +81,11 @@ const VirtualMachineCard = memo(
|
||||
return [fromMill, fromMill.toFormat('ff')]
|
||||
}, [ETIME, STIME])
|
||||
|
||||
const { color: stateColor, name: stateName } = getState(vm)
|
||||
const {
|
||||
color: stateColor,
|
||||
name: stateName,
|
||||
displayName: stateDisplayName,
|
||||
} = getState(vm)
|
||||
const error = useMemo(() => getErrorMessage(vm), [vm])
|
||||
const ips = useMemo(() => getIps(vm), [vm])
|
||||
const memValue = useMemo(() => prettyBytes(+MEMORY, 'MB'), [MEMORY])
|
||||
@@ -101,7 +105,10 @@ const VirtualMachineCard = memo(
|
||||
<div {...rootProps} data-cy={`vm-${ID}`}>
|
||||
<div className={classes.main}>
|
||||
<div className={classes.title}>
|
||||
<StatusCircle color={stateColor} tooltip={stateName} />
|
||||
<StatusCircle
|
||||
color={stateColor}
|
||||
tooltip={stateDisplayName ?? stateName}
|
||||
/>
|
||||
<Typography noWrap component="span">
|
||||
{NAME}
|
||||
</Typography>
|
||||
|
||||
@@ -44,7 +44,11 @@ const HeaderVmInfo = ({ id, type }) => {
|
||||
const [getService, { data: serviceFlow }] = useLazyGetServiceQuery()
|
||||
|
||||
const ips = getIps(vm)
|
||||
const { color: stateColor, name: stateName } = getState(vm) ?? {}
|
||||
const {
|
||||
color: stateColor,
|
||||
name: stateName,
|
||||
displayName: stateDisplayName,
|
||||
} = getState(vm) ?? {}
|
||||
const time = timeFromMilliseconds(+vm?.ETIME || +vm?.STIME)
|
||||
const isVMRC = useMemo(() => type === VM_ACTIONS.VMRC, [type])
|
||||
const serviceId = useMemo(() => vm?.USER_TEMPLATE?.SERVICE_ID, [vm])
|
||||
@@ -80,7 +84,10 @@ const HeaderVmInfo = ({ id, type }) => {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<StatusBadge title={stateName} stateColor={stateColor}>
|
||||
<StatusBadge
|
||||
title={stateDisplayName ?? stateName}
|
||||
stateColor={stateColor}
|
||||
>
|
||||
{srcLogo ? (
|
||||
<Avatar src={`${STATIC_FILES_URL}/${srcLogo}`} />
|
||||
) : (
|
||||
|
||||
@@ -59,7 +59,11 @@ const InformationPanel = ({ vm = {}, actions }) => {
|
||||
const hostAccess = useMemo(() => hasAccessToResource(HOST), [view])
|
||||
|
||||
const { ID, NAME, RESCHED, STIME, ETIME, LOCK, DEPLOY_ID } = vm
|
||||
const { name: stateName, color: stateColor } = getState(vm)
|
||||
const {
|
||||
name: stateName,
|
||||
color: stateColor,
|
||||
displayName: stateDisplayName,
|
||||
} = getState(vm)
|
||||
|
||||
const ips = getIps(vm)
|
||||
const { EXTERNAL_PORT_RANGE, INTERNAL_PORT_RANGE } =
|
||||
@@ -96,7 +100,11 @@ const InformationPanel = ({ vm = {}, actions }) => {
|
||||
value: (
|
||||
<Stack direction="row" alignItems="center" gap={1}>
|
||||
<StatusCircle color={stateColor} />
|
||||
<StatusChip dataCy="state" text={stateName} stateColor={stateColor} />
|
||||
<StatusChip
|
||||
dataCy="state"
|
||||
text={stateDisplayName ?? stateName}
|
||||
stateColor={stateColor}
|
||||
/>
|
||||
</Stack>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* @typedef {object} StateInfo
|
||||
* @property {string} color - Color.
|
||||
* @property {string} name - Name.
|
||||
* @property {string} [displayName] - Display name.
|
||||
* @property {string} [meaning] - Meaning.
|
||||
* @property {string} [shortName] - Short name.
|
||||
*/
|
||||
|
||||
@@ -300,6 +300,7 @@ export const VM_LCM_STATES = [
|
||||
name: STATES.LCM_INIT,
|
||||
color: COLOR.info.main,
|
||||
meaning: '',
|
||||
displayName: STATES.PROLOG,
|
||||
},
|
||||
{
|
||||
// 1
|
||||
|
||||
Reference in new issue
Block a user