feat(xo-web/home/host,pool): display product brand and version (#7027)

This commit is contained in:
Mathieu 2023-09-26 09:16:08 +00:00 committed by GitHub
parent 801eea7e75
commit 710689db0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 12 deletions

View File

@ -12,6 +12,7 @@
- [Patches] Support new XenServer Updates system. See [our documentation](https://xen-orchestra.com/docs/updater.html#xenserver-updates). (PR [#7044](https://github.com/vatesfr/xen-orchestra/pull/7044))
- [REST API] Hosts' audit and system logs can be downloaded [#3968](https://github.com/vatesfr/xen-orchestra/issues/3968) (PR [#7048](https://github.com/vatesfr/xen-orchestra/pull/7048))
- [Host/Advanced] New button to download system logs [#3968](https://github.com/vatesfr/xen-orchestra/issues/3968) (PR [#7048](https://github.com/vatesfr/xen-orchestra/pull/7048))
- [Home/Hosts, Pools] Display host brand and version (PR [#7027](https://github.com/vatesfr/xen-orchestra/pull/7027))
### Bug fixes

View File

@ -9,7 +9,7 @@ import semver from 'semver'
import SingleLineRow from 'single-line-row'
import HomeTags from 'home-tags'
import Tooltip from 'tooltip'
import { Row, Col } from 'grid'
import { Col } from 'grid'
import { Text } from 'editable'
import {
addTag,
@ -325,14 +325,16 @@ export default class HostItem extends Component {
</SingleLineRow>
</BlockLink>
{(this.state.expanded || expandAll) && (
<Row>
<Col mediumSize={2} className={styles.itemExpanded} style={{ marginTop: '0.3rem' }}>
<SingleLineRow>
<Col mediumSize={2} className={styles.itemExpanded}>
<span>
{host.cpus.cores}x <Icon icon='cpu' /> &nbsp; {formatSizeShort(host.memory.size)} <Icon icon='memory' />{' '}
&nbsp; v{host.version.slice(0, 3)}
{host.cpus.cores}x <Icon icon='cpu' /> &nbsp; {formatSizeShort(host.memory.size)} <Icon icon='memory' />
</span>
</Col>
<Col mediumSize={4}>
<Col mediumSize={1} className={styles.itemExpanded}>
{host.productBrand} {host.version}
</Col>
<Col mediumSize={3} className={styles.itemExpanded}>
<span style={{ fontSize: '1.4em' }}>
<HomeTags type='host' labels={host.tags} onDelete={this._removeTag} onAdd={this._addTag} />
</span>
@ -340,7 +342,7 @@ export default class HostItem extends Component {
<Col mediumSize={6} className={styles.itemExpanded}>
<MiniStats fetch={this._fetchStats} />
</Col>
</Row>
</SingleLineRow>
)}
</div>
)

View File

@ -128,6 +128,7 @@ export default class PoolItem extends Component {
const { item: pool, expandAll, selected, hostMetrics, poolHosts, nSrs, nVms } = this.props
const { missingPatchCount } = this.state
const { icon, supportLevel } = this._getPoolLicenseInfo()
const master = poolHosts[pool.master]
return (
<div className={styles.item}>
@ -260,17 +261,20 @@ export default class PoolItem extends Component {
x <Icon icon='cpu' /> {formatSizeShort(hostMetrics.memoryTotal)} <Icon icon='memory' />
</span>
</Col>
<Col mediumSize={4} className={styles.itemExpanded}>
<span>
{_('homePoolMaster')}{' '}
<Link to={`/hosts/${pool.master}`}>{poolHosts && poolHosts[pool.master].name_label}</Link>
</span>
<Col mediumSize={1} className={styles.itemExpanded}>
{master.productBrand} {master.version}
</Col>
<Col mediumSize={5}>
<span style={{ fontSize: '1.4em' }}>
<HomeTags type='pool' labels={pool.tags} onDelete={this._removeTag} onAdd={this._addTag} />
</span>
</Col>
<Col mediumSize={3} className={styles.itemExpanded}>
<span>
{_('homePoolMaster')}{' '}
<Link to={`/hosts/${pool.master}`}>{poolHosts && poolHosts[pool.master].name_label}</Link>
</span>
</Col>
</SingleLineRow>
)}
</div>