parent
8cd66af3f8
commit
8a760823b8
@ -7,6 +7,7 @@
|
||||
### Enhancements
|
||||
|
||||
- [Users] Display user groups [#3719](https://github.com/vatesfr/xen-orchestra/issues/3719) (PR [#3740](https://github.com/vatesfr/xen-orchestra/pull/3740))
|
||||
- [VDI] Display VDI's SR [3021](https://github.com/vatesfr/xen-orchestra/issues/3021) (PR [#3285](https://github.com/vatesfr/xen-orchestra/pull/3285))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -229,12 +229,17 @@ Sr.defaultProps = {
|
||||
export const Vdi = decorate([
|
||||
connectStore(() => {
|
||||
const getObject = createGetObject()
|
||||
const getSr = createGetObject((state, props) => {
|
||||
const vdi = getObject(state, props, props.self)
|
||||
return vdi && vdi.$SR
|
||||
})
|
||||
// FIXME: props.self ugly workaround to get object as a self user
|
||||
return (state, props) => ({
|
||||
vdi: getObject(state, props, props.self),
|
||||
sr: getSr(state, props),
|
||||
})
|
||||
}),
|
||||
({ vdi }) => {
|
||||
({ sr, vdi }) => {
|
||||
if (vdi === undefined) {
|
||||
return UNKNOWN_ITEM
|
||||
}
|
||||
@ -242,7 +247,9 @@ export const Vdi = decorate([
|
||||
return (
|
||||
<span>
|
||||
<Icon icon='disk' /> {vdi.name_label}
|
||||
{vdi.name_description && <span> ({vdi.name_description})</span>}
|
||||
{sr !== undefined && (
|
||||
<span className='text-muted'> - {sr.name_label}</span>
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user