fix(backup/healthcheck): mirror backup appeared detached (#7000)

This commit is contained in:
Florent BEAUCHAMP
2023-08-29 14:52:44 +02:00
committed by GitHub
parent 3baa37846e
commit 3a3fa2882c
2 changed files with 18 additions and 3 deletions
+1
View File
@@ -21,6 +21,7 @@
- [Home/VMs] Filtering with a UUID will no longer show other VMs on the same host/pool
- [Jobs] Fixes `invalid parameters` when editing [Forum#64668](https://xcp-ng.org/forum/post/64668)
- [Smart reboot] Fix cases where VMs remained in a suspended state (PR [#6980](https://github.com/vatesfr/xen-orchestra/pull/6980))
- [Backup/Health dashboard] Don't show mirrored VMs as detached backups (PR [#7000](https://github.com/vatesfr/xen-orchestra/pull/7000))
### Packages to release
@@ -23,6 +23,7 @@ import {
getRemotes,
listVmBackups,
subscribeBackupNgJobs,
subscribeMirrorBackupJobs,
subscribeSchedules,
} from 'xo'
@@ -147,10 +148,23 @@ const Health = decorate([
subscribeSchedules(schedules => {
cb(keyBy(schedules, 'id'))
}),
jobs: cb =>
jobs: cb => {
let backupJobs, mirrorJobs
subscribeBackupNgJobs(jobs => {
cb(keyBy(jobs, 'id'))
}),
backupJobs = jobs
if (mirrorJobs !== undefined) {
// both are loaded
cb(keyBy([...backupJobs, ...mirrorJobs], 'id'))
}
})
subscribeMirrorBackupJobs(jobs => {
mirrorJobs = jobs
if (backupJobs !== undefined) {
// both are loaded
cb(keyBy([...backupJobs, ...mirrorJobs], 'id'))
}
})
},
}),
connectStore({
loneSnapshots: getLoneSnapshots,