chore: reformat with Prettier
This commit is contained in:
parent
48727740c4
commit
cc4ab94428
@ -88,7 +88,10 @@ const parseDuration = milliseconds => {
|
||||
|
||||
@connect(({ lang }) => ({ lang }))
|
||||
export class FormattedDuration extends Component {
|
||||
_parseDuration = createSelector(() => this.props.duration, parseDuration)
|
||||
_parseDuration = createSelector(
|
||||
() => this.props.duration,
|
||||
parseDuration
|
||||
)
|
||||
|
||||
_humanizeDuration = createSelector(
|
||||
() => this.props.duration,
|
||||
|
@ -170,7 +170,10 @@ class GenericSelect extends React.Component {
|
||||
}
|
||||
)
|
||||
|
||||
_getObjectsById = createSelector(this._getObjects, getObjectsById)
|
||||
_getObjectsById = createSelector(
|
||||
this._getObjects,
|
||||
getObjectsById
|
||||
)
|
||||
|
||||
_getOptions = createSelector(
|
||||
() => this.props.xoContainers,
|
||||
@ -402,8 +405,9 @@ export const SelectSr = makeStoreSelect(
|
||||
.sort()
|
||||
.groupBy('$container')
|
||||
|
||||
const getContainerIds = createSelector(getSrsByContainer, srsByContainer =>
|
||||
keys(srsByContainer)
|
||||
const getContainerIds = createSelector(
|
||||
getSrsByContainer,
|
||||
srsByContainer => keys(srsByContainer)
|
||||
)
|
||||
|
||||
const getContainers = createSelector(
|
||||
@ -429,8 +433,9 @@ export const SelectVm = makeStoreSelect(
|
||||
.sort()
|
||||
.groupBy('$container')
|
||||
|
||||
const getContainerIds = createSelector(getVmsByContainer, vmsByContainer =>
|
||||
keys(vmsByContainer)
|
||||
const getContainerIds = createSelector(
|
||||
getVmsByContainer,
|
||||
vmsByContainer => keys(vmsByContainer)
|
||||
)
|
||||
|
||||
const getPools = createGetObjectsOfType('pool')
|
||||
@ -440,8 +445,10 @@ export const SelectVm = makeStoreSelect(
|
||||
.pick(getContainerIds)
|
||||
.sort()
|
||||
|
||||
const getContainers = createSelector(getPools, getHosts, (pools, hosts) =>
|
||||
pools.concat(hosts)
|
||||
const getContainers = createSelector(
|
||||
getPools,
|
||||
getHosts,
|
||||
(pools, hosts) => pools.concat(hosts)
|
||||
)
|
||||
|
||||
return {
|
||||
@ -462,7 +469,12 @@ export const SelectVmSnapshot = makeStoreSelect(
|
||||
.groupBy('$snapshot_of')
|
||||
|
||||
const getVms = createGetObjectsOfType('VM')
|
||||
.pick(createSelector(getSnapshotsByVms, keys))
|
||||
.pick(
|
||||
createSelector(
|
||||
getSnapshotsByVms,
|
||||
keys
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
return {
|
||||
@ -484,8 +496,10 @@ export const SelectHostVm = makeStoreSelect(
|
||||
.filter(getPredicate)
|
||||
.sort()
|
||||
|
||||
const getObjects = createSelector(getHosts, getVms, (hosts, vms) =>
|
||||
hosts.concat(vms)
|
||||
const getObjects = createSelector(
|
||||
getHosts,
|
||||
getVms,
|
||||
(hosts, vms) => hosts.concat(vms)
|
||||
)
|
||||
|
||||
return {
|
||||
@ -505,8 +519,9 @@ export const SelectVmTemplate = makeStoreSelect(
|
||||
.groupBy('$container')
|
||||
const getPools = createGetObjectsOfType('pool')
|
||||
.pick(
|
||||
createSelector(getVmTemplatesByPool, vmTemplatesByPool =>
|
||||
keys(vmTemplatesByPool)
|
||||
createSelector(
|
||||
getVmTemplatesByPool,
|
||||
vmTemplatesByPool => keys(vmTemplatesByPool)
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
@ -529,8 +544,9 @@ export const SelectNetwork = makeStoreSelect(
|
||||
.groupBy('$pool')
|
||||
const getPools = createGetObjectsOfType('pool')
|
||||
.pick(
|
||||
createSelector(getNetworksByPool, networksByPool =>
|
||||
keys(networksByPool)
|
||||
createSelector(
|
||||
getNetworksByPool,
|
||||
networksByPool => keys(networksByPool)
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
@ -553,7 +569,10 @@ export const SelectPif = makeStoreSelect(
|
||||
.groupBy('$host')
|
||||
const getHosts = createGetObjectsOfType('host')
|
||||
.pick(
|
||||
createSelector(getPifsByHost, networksByPool => keys(networksByPool))
|
||||
createSelector(
|
||||
getPifsByHost,
|
||||
networksByPool => keys(networksByPool)
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
@ -616,7 +635,10 @@ export const SelectVdi = makeStoreSelect(
|
||||
)
|
||||
const getVdis = createGetObjectsOfType('VDI')
|
||||
.filter(
|
||||
createSelector(getSrs, getPredicate, (srs, predicate) =>
|
||||
createSelector(
|
||||
getSrs,
|
||||
getPredicate,
|
||||
(srs, predicate) =>
|
||||
predicate
|
||||
? vdi => srs[vdi.$SR] && predicate(vdi)
|
||||
: vdi => srs[vdi.$SR]
|
||||
@ -661,7 +683,12 @@ export const SelectVgpuType = makeStoreSelect(
|
||||
)
|
||||
|
||||
const getGpuGroups = createGetObjectsOfType('gpuGroup')
|
||||
.pick(createSelector(getVgpuTypes, keys))
|
||||
.pick(
|
||||
createSelector(
|
||||
getVgpuTypes,
|
||||
keys
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
return {
|
||||
@ -867,8 +894,13 @@ export class SelectResourceSetsVdi extends React.PureComponent {
|
||||
}
|
||||
)
|
||||
|
||||
_getVdis = createSelector(this._getSrs, srs =>
|
||||
sortBy(map(flatten(map(srs, sr => sr.VDIs)), this._getObject), 'name_label')
|
||||
_getVdis = createSelector(
|
||||
this._getSrs,
|
||||
srs =>
|
||||
sortBy(
|
||||
map(flatten(map(srs, sr => sr.VDIs)), this._getObject),
|
||||
'name_label'
|
||||
)
|
||||
)
|
||||
|
||||
render() {
|
||||
|
@ -30,8 +30,9 @@ export default class SmartBackupPreview extends Component {
|
||||
(vms, predicate) => filter(vms, predicate)
|
||||
)
|
||||
|
||||
_getSampleOfMatchingVms = createSelector(this._getMatchingVms, vms =>
|
||||
vms.slice(0, SAMPLE_SIZE_OF_MATCHING_VMS)
|
||||
_getSampleOfMatchingVms = createSelector(
|
||||
this._getMatchingVms,
|
||||
vms => vms.slice(0, SAMPLE_SIZE_OF_MATCHING_VMS)
|
||||
)
|
||||
|
||||
_getQueryString = createSelector(
|
||||
|
@ -67,8 +67,7 @@ export default class ChooseSrForEachVdisModal extends Component {
|
||||
value={mainSr}
|
||||
/>
|
||||
<br />
|
||||
{props.vdis != null &&
|
||||
mainSr != null && (
|
||||
{props.vdis != null && mainSr != null && (
|
||||
<Collapsible
|
||||
buttonText={_('chooseSrForEachVdisModalSelectSr')}
|
||||
collapsible={props.vdis.length >= 3}
|
||||
|
@ -25,10 +25,16 @@ import { ejectCd, isSrWritable, setDefaultSr } from 'xo'
|
||||
return {
|
||||
pool: getPool,
|
||||
poolMaster: createGetObject(
|
||||
createSelector(getPool, ({ master }) => master)
|
||||
createSelector(
|
||||
getPool,
|
||||
({ master }) => master
|
||||
)
|
||||
),
|
||||
vbds: createGetObjectsOfType('VBD').filter(
|
||||
createSelector(getPool, ({ id }) => vbd => vbd.$pool === id)
|
||||
createSelector(
|
||||
getPool,
|
||||
({ id }) => vbd => vbd.$pool === id
|
||||
)
|
||||
),
|
||||
}
|
||||
},
|
||||
@ -57,7 +63,9 @@ export default class InstallPoolPatchesModalBody extends Component {
|
||||
|
||||
_ejectCds = () => Promise.all(this._getVmsWithCds().map(ejectCd))
|
||||
|
||||
_getTooltip = createSelector(this._getVmsWithCds, vmIds =>
|
||||
_getTooltip = createSelector(
|
||||
this._getVmsWithCds,
|
||||
vmIds =>
|
||||
vmIds.map(vmId => (
|
||||
<p className='m-0' key={vmId}>
|
||||
<Vm id={vmId} />
|
||||
|
@ -34,7 +34,9 @@ import styles from './index.css'
|
||||
.sort()
|
||||
|
||||
const getVdis = createGetObjectsOfType('VDI').pick(
|
||||
createSelector(getVbds, vbds =>
|
||||
createSelector(
|
||||
getVbds,
|
||||
vbds =>
|
||||
mapPlus(vbds, (vbd, push) => {
|
||||
if (!vbd.is_cd_drive && vbd.VDI) {
|
||||
push(vbd.VDI)
|
||||
@ -44,7 +46,12 @@ import styles from './index.css'
|
||||
)
|
||||
|
||||
const getVifs = createGetObjectsOfType('VIF')
|
||||
.pick(createSelector(getVm, vm => vm.VIFs))
|
||||
.pick(
|
||||
createSelector(
|
||||
getVm,
|
||||
vm => vm.VIFs
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
const getPifs = createGetObjectsOfType('PIF')
|
||||
@ -235,8 +242,7 @@ export default class MigrateVmModalBody extends BaseComponent {
|
||||
</Col>
|
||||
</SingleLineRow>
|
||||
</div>
|
||||
{host &&
|
||||
!doNotMigrateVdis && (
|
||||
{host && !doNotMigrateVdis && (
|
||||
<div className={styles.groupBlock}>
|
||||
<SingleLineRow>
|
||||
<Col size={12}>
|
||||
|
@ -41,11 +41,21 @@ const LINE_STYLE = { paddingBottom: '1em' }
|
||||
const getVms = createGetObjectsOfType('VM').pick((_, props) => props.vms)
|
||||
|
||||
const getVbdsByVm = createGetObjectsOfType('VBD')
|
||||
.pick(createSelector(getVms, vms => flatten(map(vms, vm => vm.$VBDs))))
|
||||
.pick(
|
||||
createSelector(
|
||||
getVms,
|
||||
vms => flatten(map(vms, vm => vm.$VBDs))
|
||||
)
|
||||
)
|
||||
.groupBy('VM')
|
||||
|
||||
const getVifsByVM = createGetObjectsOfType('VIF')
|
||||
.pick(createSelector(getVms, vms => flatten(map(vms, vm => vm.VIFs))))
|
||||
.pick(
|
||||
createSelector(
|
||||
getVms,
|
||||
vms => flatten(map(vms, vm => vm.VIFs))
|
||||
)
|
||||
)
|
||||
.groupBy('$VM')
|
||||
|
||||
return {
|
||||
|
@ -146,7 +146,9 @@ class DefaultCard extends Component {
|
||||
_getHostMetrics = createGetHostMetrics(this._getHosts)
|
||||
|
||||
_getVmMetrics = createCollectionWrapper(
|
||||
createSelector(this._getVms, vms => {
|
||||
createSelector(
|
||||
this._getVms,
|
||||
vms => {
|
||||
const metrics = {
|
||||
vcpus: 0,
|
||||
running: 0,
|
||||
@ -162,11 +164,14 @@ class DefaultCard extends Component {
|
||||
} else metrics.other++
|
||||
})
|
||||
return metrics
|
||||
})
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
_getSrMetrics = createCollectionWrapper(
|
||||
createSelector(this._getSrs, srs => {
|
||||
createSelector(
|
||||
this._getSrs,
|
||||
srs => {
|
||||
const metrics = {
|
||||
srTotal: 0,
|
||||
srUsage: 0,
|
||||
@ -176,7 +181,8 @@ class DefaultCard extends Component {
|
||||
metrics.srTotal += sr.size
|
||||
})
|
||||
return metrics
|
||||
})
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
_getTopSrs = createTop(this._getSrs, [sr => sr.physical_usage / sr.size], 5)
|
||||
|
@ -28,11 +28,14 @@ import styles from './index.css'
|
||||
)
|
||||
)
|
||||
|
||||
const getMissingPatches = createSelector(getPoolHosts, hosts => {
|
||||
const getMissingPatches = createSelector(
|
||||
getPoolHosts,
|
||||
hosts => {
|
||||
return Promise.all(map(hosts, host => getHostMissingPatches(host))).then(
|
||||
patches => uniq(map(flatten(patches), 'name'))
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
const getHostMetrics = createGetHostMetrics(getPoolHosts)
|
||||
|
||||
|
@ -38,7 +38,10 @@ import styles from './index.css'
|
||||
(_, props) => props.item,
|
||||
(pool, sr) => pool && pool.default_SR === sr.id
|
||||
),
|
||||
isShared: createSelector((_, props) => props.item, isSrShared),
|
||||
isShared: createSelector(
|
||||
(_, props) => props.item,
|
||||
isSrShared
|
||||
),
|
||||
status: createSelector(
|
||||
createGetObjectsOfType('PBD').filter((_, props) => pbd =>
|
||||
pbd.SR === props.item.id
|
||||
|
@ -50,11 +50,17 @@ const isRunning = host => host && host.power_state === 'Running'
|
||||
const getPool = createGetObject((state, props) => getHost(state, props).$pool)
|
||||
|
||||
const getVmController = createGetObjectsOfType('VM-controller').find(
|
||||
createSelector(getHost, ({ id }) => obj => obj.$container === id)
|
||||
createSelector(
|
||||
getHost,
|
||||
({ id }) => obj => obj.$container === id
|
||||
)
|
||||
)
|
||||
|
||||
const getHostVms = createGetObjectsOfType('VM').filter(
|
||||
createSelector(getHost, ({ id }) => obj => obj.$container === id)
|
||||
createSelector(
|
||||
getHost,
|
||||
({ id }) => obj => obj.$container === id
|
||||
)
|
||||
)
|
||||
|
||||
const getNumberOfVms = getHostVms.count()
|
||||
@ -71,25 +77,35 @@ const isRunning = host => host && host.power_state === 'Running'
|
||||
.sort()
|
||||
|
||||
const getPifs = createGetObjectsOfType('PIF')
|
||||
.pick(createSelector(getHost, host => host.$PIFs))
|
||||
.pick(
|
||||
createSelector(
|
||||
getHost,
|
||||
host => host.$PIFs
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
const getNetworks = createGetObjectsOfType('network').pick(
|
||||
createSelector(getPifs, pifs => map(pifs, pif => pif.$network))
|
||||
createSelector(
|
||||
getPifs,
|
||||
pifs => map(pifs, pif => pif.$network)
|
||||
)
|
||||
)
|
||||
|
||||
const getPrivateNetworks = createFilter(
|
||||
createGetObjectsOfType('network'),
|
||||
createSelector(getPool, pool => network =>
|
||||
network.$pool === pool.id && isEmpty(network.PIFs)
|
||||
createSelector(
|
||||
getPool,
|
||||
pool => network => network.$pool === pool.id && isEmpty(network.PIFs)
|
||||
)
|
||||
)
|
||||
|
||||
const getHostPatches = createSelector(
|
||||
createGetObjectsOfType('pool_patch'),
|
||||
createGetObjectsOfType('host_patch').pick(
|
||||
createSelector(getHost, host =>
|
||||
isString(host.patches[0]) ? host.patches : []
|
||||
createSelector(
|
||||
getHost,
|
||||
host => (isString(host.patches[0]) ? host.patches : [])
|
||||
)
|
||||
),
|
||||
(poolsPatches, hostsPatches) =>
|
||||
@ -101,8 +117,9 @@ const isRunning = host => host && host.power_state === 'Running'
|
||||
|
||||
const doesNeedRestart = createDoesHostNeedRestart(getHost)
|
||||
|
||||
const getMemoryUsed = createSelector(getHostVms, vms =>
|
||||
sum(map(vms, vm => vm.memory.size))
|
||||
const getMemoryUsed = createSelector(
|
||||
getHostVms,
|
||||
vms => sum(map(vms, vm => vm.memory.size))
|
||||
)
|
||||
|
||||
return (state, props) => {
|
||||
|
@ -42,7 +42,10 @@ const getPackId = ({ author, name }) => `${author}\0${name}`
|
||||
.sort()
|
||||
|
||||
const getPcis = createGetObjectsOfType('PCI').pick(
|
||||
createSelector(getPgpus, pgpus => map(pgpus, 'pci'))
|
||||
createSelector(
|
||||
getPgpus,
|
||||
pgpus => map(pgpus, 'pci')
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
|
@ -121,10 +121,16 @@ export default connectStore(() => {
|
||||
(_, props) => props.host.$PBDs
|
||||
)
|
||||
const srs = createGetObjectsOfType('SR').pick(
|
||||
createSelector(pbds, pbds => map(pbds, pbd => pbd.SR))
|
||||
createSelector(
|
||||
pbds,
|
||||
pbds => map(pbds, pbd => pbd.SR)
|
||||
)
|
||||
)
|
||||
|
||||
const storages = createSelector(pbds, srs, (pbds, srs) =>
|
||||
const storages = createSelector(
|
||||
pbds,
|
||||
srs,
|
||||
(pbds, srs) =>
|
||||
map(pbds, pbd => {
|
||||
const sr = srs[pbd.SR]
|
||||
const { physical_usage: usage, size } = sr
|
||||
|
@ -82,7 +82,10 @@ export default class Menu extends Component {
|
||||
isEmpty
|
||||
)
|
||||
|
||||
_getNoResourceSets = createSelector(() => this.props.resourceSets, isEmpty)
|
||||
_getNoResourceSets = createSelector(
|
||||
() => this.props.resourceSets,
|
||||
isEmpty
|
||||
)
|
||||
|
||||
get height() {
|
||||
return this.refs.content.offsetHeight
|
||||
|
@ -44,20 +44,36 @@ import TabPatches from './tab-patches'
|
||||
|
||||
const getNetworks = createGetObjectsOfType('network')
|
||||
.filter(
|
||||
createSelector(getPool, ({ id }) => network => network.$pool === id)
|
||||
createSelector(
|
||||
getPool,
|
||||
({ id }) => network => network.$pool === id
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
const getHosts = createGetObjectsOfType('host')
|
||||
.filter(createSelector(getPool, ({ id }) => obj => obj.$pool === id))
|
||||
.filter(
|
||||
createSelector(
|
||||
getPool,
|
||||
({ id }) => obj => obj.$pool === id
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
const getPoolSrs = createGetObjectsOfType('SR')
|
||||
.filter(createSelector(getPool, ({ id }) => sr => sr.$pool === id))
|
||||
.filter(
|
||||
createSelector(
|
||||
getPool,
|
||||
({ id }) => sr => sr.$pool === id
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
const getNumberOfVms = createGetObjectsOfType('VM').count(
|
||||
createSelector(getPool, ({ id }) => obj => obj.$pool === id)
|
||||
createSelector(
|
||||
getPool,
|
||||
({ id }) => obj => obj.$pool === id
|
||||
)
|
||||
)
|
||||
|
||||
const getLogs = createGetObjectMessages(getPool)
|
||||
|
@ -171,7 +171,12 @@ class ToggleDefaultLockingMode extends Component {
|
||||
|
||||
@connectStore(() => {
|
||||
const pif = createGetObject()
|
||||
const host = createGetObject(createSelector(pif, pif => pif.$host))
|
||||
const host = createGetObject(
|
||||
createSelector(
|
||||
pif,
|
||||
pif => pif.$host
|
||||
)
|
||||
)
|
||||
const disableUnplug = createSelector(
|
||||
pif,
|
||||
pif =>
|
||||
|
@ -47,11 +47,17 @@ import TabXosan from './tab-xosan'
|
||||
)
|
||||
|
||||
const getPbds = createGetObjectsOfType('PBD').pick(
|
||||
createSelector(getSr, sr => sr.$PBDs)
|
||||
createSelector(
|
||||
getSr,
|
||||
sr => sr.$PBDs
|
||||
)
|
||||
)
|
||||
|
||||
const getSrHosts = createGetObjectsOfType('host').pick(
|
||||
createSelector(getPbds, pbds => map(pbds, pbd => pbd.host))
|
||||
createSelector(
|
||||
getPbds,
|
||||
pbds => map(pbds, pbd => pbd.host)
|
||||
)
|
||||
)
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
@ -69,7 +75,12 @@ import TabXosan from './tab-xosan'
|
||||
.pick(getVdiIds)
|
||||
.sort()
|
||||
const getUnmanagedVdis = createGetObjectsOfType('VDI-unmanaged')
|
||||
.pick(createSelector(getSr, sr => sr.VDIs))
|
||||
.pick(
|
||||
createSelector(
|
||||
getSr,
|
||||
sr => sr.VDIs
|
||||
)
|
||||
)
|
||||
.sort()
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
@ -41,7 +41,10 @@ const UnhealthyVdiChains = flowRight(
|
||||
})),
|
||||
connectStore(() => ({
|
||||
vdis: createGetObjectsOfType('VDI').pick(
|
||||
createSelector((_, props) => props.chains, keys)
|
||||
createSelector(
|
||||
(_, props) => props.chains,
|
||||
keys
|
||||
)
|
||||
),
|
||||
}))
|
||||
)(({ chains, vdis }) =>
|
||||
|
@ -79,7 +79,10 @@ const COLUMNS = [
|
||||
const getVbds = createGetObjectsOfType('VBD')
|
||||
.pick((_, props) => props.item.$VBDs)
|
||||
.sort()
|
||||
const getVmIds = createSelector(getVbds, vbds => map(vbds, 'VM'))
|
||||
const getVmIds = createSelector(
|
||||
getVbds,
|
||||
vbds => map(vbds, 'VM')
|
||||
)
|
||||
const getVms = createGetObjectsOfType('VM').pick(getVmIds)
|
||||
const getVmControllers = createGetObjectsOfType('VM-controller').pick(
|
||||
getVmIds
|
||||
|
@ -171,7 +171,10 @@ const GROUPED_ACTIONS = [
|
||||
const getPendingTasksByPool = getPendingTasks.sort().groupBy('$pool')
|
||||
|
||||
const getPools = createGetObjectsOfType('pool').pick(
|
||||
createSelector(getPendingTasksByPool, keys)
|
||||
createSelector(
|
||||
getPendingTasksByPool,
|
||||
keys
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
@ -202,7 +205,10 @@ export default class Tasks extends Component {
|
||||
}
|
||||
|
||||
_getTasks = createSelector(
|
||||
createSelector(() => this.state.pools, resolveIds),
|
||||
createSelector(
|
||||
() => this.state.pools,
|
||||
resolveIds
|
||||
),
|
||||
() => this.props.pendingTasksByPool,
|
||||
(poolIds, pendingTasksByPool) =>
|
||||
isEmpty(poolIds)
|
||||
@ -213,7 +219,10 @@ export default class Tasks extends Component {
|
||||
_getFinishedTasks = createFilter(
|
||||
() => this.state.finishedTasks,
|
||||
createSelector(
|
||||
createSelector(() => this.state.pools, resolveIds),
|
||||
createSelector(
|
||||
() => this.state.pools,
|
||||
resolveIds
|
||||
),
|
||||
poolIds =>
|
||||
isEmpty(poolIds) ? null : ({ $poolId }) => poolIds.includes($poolId)
|
||||
)
|
||||
|
@ -40,7 +40,10 @@ export default connectStore(() => {
|
||||
const getAttachedVgpu = createFinder(getVgpus, vgpu => vgpu.currentlyAttached)
|
||||
|
||||
const getVgpuTypes = createGetObjectsOfType('vgpuType').pick(
|
||||
createSelector(getVgpus, vgpus => map(vgpus, 'vgpuType'))
|
||||
createSelector(
|
||||
getVgpus,
|
||||
vgpus => map(vgpus, 'vgpuType')
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
|
@ -498,8 +498,9 @@ class NewVif extends BaseComponent {
|
||||
const getVifs = createGetObjectsOfType('VIF').pick(
|
||||
(_, props) => props.vm.VIFs
|
||||
)
|
||||
const getNetworksId = createSelector(getVifs, vifs =>
|
||||
map(vifs, vif => vif.$network)
|
||||
const getNetworksId = createSelector(
|
||||
getVifs,
|
||||
vifs => map(vifs, vif => vif.$network)
|
||||
)
|
||||
const getNetworks = createGetObjectsOfType('network').pick(getNetworksId)
|
||||
|
||||
|
@ -270,8 +270,9 @@ const XOSAN_INDIVIDUAL_ACTIONS = [
|
||||
}
|
||||
)
|
||||
|
||||
const getPoolPredicate = createSelector(getXosanSrs, srs => pool =>
|
||||
every(srs, sr => sr.$pool !== pool.id)
|
||||
const getPoolPredicate = createSelector(
|
||||
getXosanSrs,
|
||||
srs => pool => every(srs, sr => sr.$pool !== pool.id)
|
||||
)
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user