feat(xo-web/backup/logs): better resolution of last run log (#5141)
This commit is contained in:
parent
dfdd0a0496
commit
9351b4a5bb
@ -7,6 +7,8 @@
|
||||
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [Backup] Better resolution of the "last run log" quick access (PR [#5141](https://github.com/vatesfr/xen-orchestra/pull/5141))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
@ -32,4 +34,4 @@
|
||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||
|
||||
- xo-server patch
|
||||
- xo-web patch
|
||||
- xo-web minor
|
||||
|
@ -117,11 +117,17 @@ const SchedulePreviewBody = decorate([
|
||||
let lastRunLog
|
||||
for (const runId in logs) {
|
||||
const log = logs[runId]
|
||||
if (
|
||||
log.scheduleId === schedule.id &&
|
||||
(lastRunLog === undefined || lastRunLog.start < log.start)
|
||||
) {
|
||||
lastRunLog = log
|
||||
if (log.scheduleId === schedule.id) {
|
||||
if (log.status === 'pending') {
|
||||
lastRunLog = log
|
||||
break
|
||||
}
|
||||
if (
|
||||
lastRunLog === undefined ||
|
||||
(lastRunLog.end || lastRunLog.start) < (log.end || log.start)
|
||||
) {
|
||||
lastRunLog = log
|
||||
}
|
||||
}
|
||||
}
|
||||
cb(lastRunLog)
|
||||
|
Loading…
Reference in New Issue
Block a user