Skip to content

Commit

Permalink
feat(xo-web/dashboard/health): VDIs to coalesce warning contains the …
Browse files Browse the repository at this point in the history
…number (#7111)

Fixes Zammad#17577
  • Loading branch information
MelissaFrncJrg authored Oct 20, 2023
1 parent 1a0e5eb commit 1fac792
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [PIF] Show network name in PIF selectors (PR [#7081](https://github.com/vatesfr/xen-orchestra/pull/7081))
- [VM/Advanced] Possibility to create/delete VTPM [#7066](https://github.com/vatesfr/xen-orchestra/issues/7066) [Forum#6578](https://xcp-ng.org/forum/topic/6578/xcp-ng-8-3-public-alpha/109) (PR [#7085](https://github.com/vatesfr/xen-orchestra/pull/7085))
- [VM/New] Possibility to create and attach a _VTPM_ to a VM [#7066](https://github.com/vatesfr/xen-orchestra/issues/7066) [Forum#6578](https://xcp-ng.org/forum/topic/6578/xcp-ng-8-3-public-alpha/109) (PR [#7077](https://github.com/vatesfr/xen-orchestra/pull/7077))
- [Dashboard/Health] Displays number of VDIs to coalesce (PR [#7111](https://github.com/vatesfr/xen-orchestra/pull/7111))

### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ const messages = {
unhealthyVdis: 'Unhealthy VDIs',
vdisToCoalesce: 'VDIs to coalesce',
vdisWithInvalidVhdParent: 'VDIs with invalid parent VHD',
srVdisToCoalesceWarning: 'This SR has more than {limitVdis, number} VDIs to coalesce',
srVdisToCoalesceWarning: 'This SR has {nVdis, number} VDI{nVdis, plural, one {} other {s}} to coalesce',

// ----- New VM -----
createVmModalTitle: 'Create VM',
Expand Down
6 changes: 3 additions & 3 deletions packages/xo-web/src/xo-app/dashboard/health/unhealthyVdis.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { connectStore } from 'utils'
import { Col, Row } from 'grid'
import { createGetObjectsOfType } from 'selectors'
import { injectState, provideState } from 'reaclette'
import { forEach, isEmpty, map, size } from 'lodash'
import { forEach, isEmpty, map } from 'lodash'
import { Sr, Vdi } from 'render-xo-item'
import { subscribeSrsUnhealthyVdiChainsLength, VDIS_TO_COALESCE_LIMIT } from 'xo'

Expand All @@ -20,8 +20,8 @@ const COLUMNS = [
itemRenderer: (srId, { vdisHealthBySr }) => (
<div>
<Sr id={srId} link />{' '}
{size(vdisHealthBySr[srId].unhealthyVdis) >= VDIS_TO_COALESCE_LIMIT && (
<Tooltip content={_('srVdisToCoalesceWarning', { limitVdis: VDIS_TO_COALESCE_LIMIT })}>
{vdisHealthBySr[srId].nUnhealthyVdis >= VDIS_TO_COALESCE_LIMIT && (
<Tooltip content={_('srVdisToCoalesceWarning', { nVdis: vdisHealthBySr[srId].nUnhealthyVdis })}>
<span className='text-warning'>
<Icon icon='alarm' />
</span>
Expand Down

0 comments on commit 1fac792

Please sign in to comment.