backup: show last integrity in info dialog

This commit is contained in:
Girish Ramakrishnan
2026-02-09 21:46:04 +01:00
parent 26999afc22
commit 26a3cf79c5
2 changed files with 10 additions and 1 deletions

View File

@@ -134,6 +134,14 @@ defineExpose({
<div v-if="backup.type === 'box'" class="info-value">{{ prettyDuration(backup.stats.aggregatedUpload.duration + backup.stats.aggregatedCopy.duration) }}</div>
<div v-else class="info-value">{{ prettyDuration(backup.stats.upload.duration + backup.stats.copy.duration) }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ $t('backups.backupDetails.lastIntegrityCheck') }}</div>
<div class="info-value">
<span v-if="backup.integrityCheckTaskId">{{ $t('backups.backupDetails.integrityInProgress') }}</span>
<span v-else-if="backup.lastIntegrityCheckTime">{{ prettyLongDate(backup.lastIntegrityCheckTime) }}</span>
<span v-else>{{ $t('backups.backupDetails.integrityNever') }}</span>
</div>
</div>
<hr style="margin: 15px 0" v-if="backup.type === 'box'"/>

View File

@@ -251,7 +251,7 @@ async function refreshIntegrityTasks() {
if (!result.active) delete integrityTasks.value[taskId];
}
const stillActive = Object.keys(integrityTasks).length !== 0;
const stillActive = Object.keys(integrityTasks.value).length !== 0;
if (stillActive) {
integrityPollTimer = setTimeout(refreshIntegrityTasks, 10000);
} else {
@@ -262,6 +262,7 @@ async function refreshIntegrityTasks() {
async function onCheckIntegrity(backup) {
const [error, taskId] = await backupsModel.checkIntegrity(backup.id);
if (error) return window.cloudron.onError(error);
backup.integrityCheckTaskId = taskId;
integrityTasks.value[taskId] = {};
await refreshIntegrityTasks();
}