feat(xo-web/render-xo-item): add pool name to networks (#4990)
Fixes #4885
This commit is contained in:
parent
cc32c50665
commit
258e07c2ca
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
- [VM] Move boot order setting from Disk tab to Advanced tab [#1523](https://github.com/vatesfr/xen-orchestra/issues/1523#issuecomment-563141573) (PR [#4975](https://github.com/vatesfr/xen-orchestra/pull/4975))
|
- [VM] Move boot order setting from Disk tab to Advanced tab [#1523](https://github.com/vatesfr/xen-orchestra/issues/1523#issuecomment-563141573) (PR [#4975](https://github.com/vatesfr/xen-orchestra/pull/4975))
|
||||||
- [XOA/licenses] Display proxy licenses (PR [#4944](https://github.com/vatesfr/xen-orchestra/pull/4944))
|
- [XOA/licenses] Display proxy licenses (PR [#4944](https://github.com/vatesfr/xen-orchestra/pull/4944))
|
||||||
|
- [Network selector] Display pool's name [#4885](https://github.com/vatesfr/xen-orchestra/issues/4885) (PR [#4990](https://github.com/vatesfr/xen-orchestra/pull/4990))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
@ -318,12 +318,17 @@ Vdi.defaultProps = {
|
|||||||
export const Network = decorate([
|
export const Network = decorate([
|
||||||
connectStore(() => {
|
connectStore(() => {
|
||||||
const getObject = createGetObject()
|
const getObject = createGetObject()
|
||||||
|
const getPool = createGetObject(
|
||||||
|
createSelector(getObject, network => get(() => network.$pool))
|
||||||
|
)
|
||||||
|
|
||||||
// FIXME: props.self ugly workaround to get object as a self user
|
// FIXME: props.self ugly workaround to get object as a self user
|
||||||
return (state, props) => ({
|
return (state, props) => ({
|
||||||
network: getObject(state, props, props.self),
|
network: getObject(state, props, props.self),
|
||||||
|
pool: getPool(state, props),
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
({ id, network }) => {
|
({ id, network, pool }) => {
|
||||||
if (network === undefined) {
|
if (network === undefined) {
|
||||||
return unknowItem(id, 'network')
|
return unknowItem(id, 'network')
|
||||||
}
|
}
|
||||||
@ -331,6 +336,9 @@ export const Network = decorate([
|
|||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
<Icon icon='network' /> {network.name_label}
|
<Icon icon='network' /> {network.name_label}
|
||||||
|
{pool !== undefined && (
|
||||||
|
<span className='text-muted'>{` - ${pool.name_label}`}</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user