diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ea022397..2397aacc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [Plugins] New field to filter displayed plugins (PR [#3832](https://github.com/vatesfr/xen-orchestra/pull/3871)) - Ability to copy ID of "unknown item"s [#3833](https://github.com/vatesfr/xen-orchestra/issues/3833) (PR [#3856](https://github.com/vatesfr/xen-orchestra/pull/3856)) - [Cloud-Init] switch config drive type to `nocloud` to prepare for the passing of network config (PR [#3877](https://github.com/vatesfr/xen-orchestra/pull/3877)) +- [UI] Show pool name next to templates' names [#3894](https://github.com/vatesfr/xen-orchestra/issues/3894) (PR [#3896](https://github.com/vatesfr/xen-orchestra/pull/3896)) ### Bug fixes diff --git a/packages/xo-web/src/common/render-xo-item.js b/packages/xo-web/src/common/render-xo-item.js index 092bf5e36..395e39de0 100644 --- a/packages/xo-web/src/common/render-xo-item.js +++ b/packages/xo-web/src/common/render-xo-item.js @@ -170,12 +170,19 @@ Vm.defaultProps = { export const VmTemplate = decorate([ connectStore(() => { const getObject = createGetObject() + const getPool = createGetObject( + createSelector( + getObject, + vm => get(() => vm.$pool) + ) + ) return (state, props) => ({ // FIXME: props.self ugly workaround to get object as a self user template: getObject(state, props, props.self), + pool: getPool(state, props), }) }), - ({ id, template }) => { + ({ id, template, pool }) => { if (template === undefined) { return unknowItem(id, 'template') } @@ -183,6 +190,9 @@ export const VmTemplate = decorate([ return ( {template.name_label} + {pool !== undefined && ( + {` - ${pool.name_label}`} + )} ) },