mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
7e24b82c14
commit
70dbe010f3
@ -33,7 +33,7 @@ const Row = memo(({ original, ...props }) => {
|
||||
const { DEPLOY_ID, VM_NAME } = original
|
||||
|
||||
return (
|
||||
<div {...props}>
|
||||
<div data-cy={`wild-${DEPLOY_ID}`} {...props}>
|
||||
<div className={classes.main}>
|
||||
<div className={classes.title}>
|
||||
<Typography noWrap component="span">
|
||||
|
@ -38,7 +38,7 @@ const ZombiesTable = (props) => {
|
||||
data={useMemo(() => zombies, [zombies])}
|
||||
rootProps={rootProps}
|
||||
searchProps={searchProps}
|
||||
getRowId={(row) => String(row.ZOMBIE_VM)}
|
||||
getRowId={(row) => String(row.DEPLOY_ID)}
|
||||
RowComponent={ZombieRow}
|
||||
{...rest}
|
||||
/>
|
||||
|
@ -30,14 +30,14 @@ import { Row as RowType } from 'react-table'
|
||||
*/
|
||||
const Row = memo(({ original, ...props }) => {
|
||||
const classes = rowStyles()
|
||||
const { ZOMBIE_VM } = original
|
||||
const { DEPLOY_ID, VM_NAME } = original
|
||||
|
||||
return (
|
||||
<div {...props}>
|
||||
<div data-cy={`zombie-${DEPLOY_ID}`} {...props}>
|
||||
<div className={classes.main}>
|
||||
<div className={classes.title}>
|
||||
<Typography noWrap component="span">
|
||||
{ZOMBIE_VM}
|
||||
{VM_NAME}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -133,12 +133,15 @@ export const getKvmMachines = (hosts = []) => {
|
||||
* @param {Host} host - Host
|
||||
* @returns {object[]} - List of zombies from host
|
||||
*/
|
||||
export const getHostZombies = (host = {}) =>
|
||||
[
|
||||
host?.TEMPLATE?.ZOMBIES?.split(', ')?.map((zombie) => ({
|
||||
ZOMBIE_VM: zombie,
|
||||
})) ?? [],
|
||||
].flat()
|
||||
export const getHostZombies = (host = {}) => {
|
||||
const zombies = host?.TEMPLATE?.ZOMBIES?.split(', ') ?? []
|
||||
|
||||
const vms = [host?.TEMPLATE?.VM ?? []]
|
||||
.flat()
|
||||
.filter((vm) => vm.VCENTER_TEMPLATE === 'YES')
|
||||
|
||||
return vms.filter((vm) => vm?.VM_NAME && zombies.includes(vm?.VM_NAME))
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of Wilds available from the host.
|
||||
@ -146,10 +149,15 @@ export const getHostZombies = (host = {}) =>
|
||||
* @param {Host} host - Host
|
||||
* @returns {object[]} - List of wilds from host
|
||||
*/
|
||||
export const getHostWilds = (host = {}) =>
|
||||
[host?.TEMPLATE?.VM ?? []]
|
||||
export const getHostWilds = (host = {}) => {
|
||||
const wilds = host?.TEMPLATE?.WILDS?.split(', ') ?? []
|
||||
|
||||
const vms = [host?.TEMPLATE?.VM ?? []]
|
||||
.flat()
|
||||
.filter((vm) => vm.VCENTER_TEMPLATE === 'YES')
|
||||
|
||||
return vms.filter((vm) => vm?.VM_NAME && wilds.includes(vm?.VM_NAME))
|
||||
}
|
||||
/**
|
||||
* Returns list of Numa available from the host.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user