feat(xo-web/storage): display SR used for the HA state files (#6384)
Fixes #6339
This commit is contained in:
parent
276d1ce60a
commit
4dc7575d5b
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||||
|
|
||||||
|
- [Home/Storage] Show which SRs are used for HA state files [#6339](https://github.com/vatesfr/xen-orchestra/issues/6339) (PR [#6384](https://github.com/vatesfr/xen-orchestra/pull/6384))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||||
@ -37,6 +39,6 @@
|
|||||||
- xen-api patch
|
- xen-api patch
|
||||||
- xo-vmdk-to-vhd patch
|
- xo-vmdk-to-vhd patch
|
||||||
- xo-server minor
|
- xo-server minor
|
||||||
- xo-web patch
|
- xo-web minor
|
||||||
|
|
||||||
<!--packages-end-->
|
<!--packages-end-->
|
||||||
|
@ -107,6 +107,7 @@ const TRANSFORMS = {
|
|||||||
current_operations: obj.current_operations,
|
current_operations: obj.current_operations,
|
||||||
default_SR: link(obj, 'default_SR'),
|
default_SR: link(obj, 'default_SR'),
|
||||||
HA_enabled: Boolean(obj.ha_enabled),
|
HA_enabled: Boolean(obj.ha_enabled),
|
||||||
|
haSrs: obj.$ha_statefiles.map(vdi => link(vdi, 'SR')),
|
||||||
master: link(obj, 'master'),
|
master: link(obj, 'master'),
|
||||||
tags: obj.tags,
|
tags: obj.tags,
|
||||||
name_description: obj.name_description,
|
name_description: obj.name_description,
|
||||||
|
@ -1280,6 +1280,7 @@ const messages = {
|
|||||||
protectFromDeletion: 'Protect from accidental deletion',
|
protectFromDeletion: 'Protect from accidental deletion',
|
||||||
protectFromShutdown: 'Protect from accidental shutdown',
|
protectFromShutdown: 'Protect from accidental shutdown',
|
||||||
ha: 'HA',
|
ha: 'HA',
|
||||||
|
srHaTooltip: 'SR used for High Availability',
|
||||||
nestedVirt: 'Nested virtualization',
|
nestedVirt: 'Nested virtualization',
|
||||||
vmAffinityHost: 'Affinity host',
|
vmAffinityHost: 'Affinity host',
|
||||||
vmVga: 'VGA',
|
vmVga: 'VGA',
|
||||||
|
@ -18,6 +18,11 @@ import styles from './index.css'
|
|||||||
|
|
||||||
@connectStore({
|
@connectStore({
|
||||||
container: createGetObject((_, props) => props.item.$container),
|
container: createGetObject((_, props) => props.item.$container),
|
||||||
|
isHa: createSelector(
|
||||||
|
(_, props) => props.item,
|
||||||
|
createGetObject((_, props) => props.item.$poolId),
|
||||||
|
(sr, pool) => pool.haSrs.includes(sr.id)
|
||||||
|
),
|
||||||
isDefaultSr: createSelector(
|
isDefaultSr: createSelector(
|
||||||
createGetObjectsOfType('pool').find((_, props) => pool => props.item.$pool === pool.id),
|
createGetObjectsOfType('pool').find((_, props) => pool => props.item.$pool === pool.id),
|
||||||
(_, props) => props.item,
|
(_, props) => props.item,
|
||||||
@ -97,7 +102,7 @@ export default class SrItem extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { container, expandAll, isDefaultSr, isShared, item: sr, selected } = this.props
|
const { container, expandAll, isDefaultSr, isHa, isShared, item: sr, selected } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.item}>
|
<div className={styles.item}>
|
||||||
@ -113,6 +118,11 @@ export default class SrItem extends Component {
|
|||||||
<Text value={sr.name_label} onChange={this._setNameLabel} useLongClick />
|
<Text value={sr.name_label} onChange={this._setNameLabel} useLongClick />
|
||||||
</Ellipsis>
|
</Ellipsis>
|
||||||
{isDefaultSr && <span className='tag tag-pill tag-info ml-1'>{_('defaultSr')}</span>}
|
{isDefaultSr && <span className='tag tag-pill tag-info ml-1'>{_('defaultSr')}</span>}
|
||||||
|
{isHa && (
|
||||||
|
<Tooltip content={_('srHaTooltip')}>
|
||||||
|
<span className='tag tag-pill tag-info ml-1'>{_('ha')}</span>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
{sr.inMaintenanceMode && <span className='tag tag-pill tag-warning ml-1'>{_('maintenanceMode')}</span>}
|
{sr.inMaintenanceMode && <span className='tag tag-pill tag-warning ml-1'>{_('maintenanceMode')}</span>}
|
||||||
</EllipsisContainer>
|
</EllipsisContainer>
|
||||||
</Col>
|
</Col>
|
||||||
|
Loading…
Reference in New Issue
Block a user