Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 VM as detached backups (PR [#7000](https://github.com/vatesfr/xen-orchestra/pull/7000))
fbeauchamp marked this conversation as resolved.
Show resolved Hide resolved

### Packages to release

Expand Down
20 changes: 17 additions & 3 deletions packages/xo-web/src/xo-app/backup/health/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
getRemotes,
listVmBackups,
subscribeBackupNgJobs,
subscribeMirrorBackupJobs,
subscribeSchedules,
} from 'xo'

Expand Down Expand Up @@ -147,10 +148,23 @@ const Health = decorate([
subscribeSchedules(schedules => {
cb(keyBy(schedules, 'id'))
}),
jobs: cb =>
jobs: async cb => {
fbeauchamp marked this conversation as resolved.
Show resolved Hide resolved
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,
Expand Down