fix(xo-web/health): fix "an error has occurred" (#6508)

This commit is contained in:
Mathieu 2022-11-08 09:52:54 +01:00 committed by GitHub
parent 249f124ba6
commit 12e98bfd31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -19,6 +19,7 @@
- [Pool] Add tooltip on "no XCP-ng Pro support" warning icon (PR [#6505](https://github.com/vatesfr/xen-orchestra/pull/6505))
- [Backup] Respect HTTP proxy setting when connecting to XCP-ng/XenServer pools
- [Dashboard/Health] Fix `an error has occurred` in case of unknown default SR (PR [#6508](https://github.com/vatesfr/xen-orchestra/pull/6508))
### Packages to release

View File

@ -634,7 +634,12 @@ export default class Health extends Component {
const nbHostsPerPool = countBy(hosts, host => host.$pool)
return filter(selectedPools, pool => {
const { default_SR } = pool
return default_SR !== undefined && !userSrs[default_SR].shared && nbHostsPerPool[pool.id] > 1
return (
default_SR !== undefined &&
userSrs[default_SR] !== undefined &&
!userSrs[default_SR].shared &&
nbHostsPerPool[pool.id] > 1
)
})
}
)