backup: show last integrity in info dialog
This commit is contained in:
@@ -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-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 v-else class="info-value">{{ prettyDuration(backup.stats.upload.duration + backup.stats.copy.duration) }}</div>
|
||||||
</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'"/>
|
<hr style="margin: 15px 0" v-if="backup.type === 'box'"/>
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ async function refreshIntegrityTasks() {
|
|||||||
if (!result.active) delete integrityTasks.value[taskId];
|
if (!result.active) delete integrityTasks.value[taskId];
|
||||||
}
|
}
|
||||||
|
|
||||||
const stillActive = Object.keys(integrityTasks).length !== 0;
|
const stillActive = Object.keys(integrityTasks.value).length !== 0;
|
||||||
if (stillActive) {
|
if (stillActive) {
|
||||||
integrityPollTimer = setTimeout(refreshIntegrityTasks, 10000);
|
integrityPollTimer = setTimeout(refreshIntegrityTasks, 10000);
|
||||||
} else {
|
} else {
|
||||||
@@ -262,6 +262,7 @@ async function refreshIntegrityTasks() {
|
|||||||
async function onCheckIntegrity(backup) {
|
async function onCheckIntegrity(backup) {
|
||||||
const [error, taskId] = await backupsModel.checkIntegrity(backup.id);
|
const [error, taskId] = await backupsModel.checkIntegrity(backup.id);
|
||||||
if (error) return window.cloudron.onError(error);
|
if (error) return window.cloudron.onError(error);
|
||||||
|
backup.integrityCheckTaskId = taskId;
|
||||||
integrityTasks.value[taskId] = {};
|
integrityTasks.value[taskId] = {};
|
||||||
await refreshIntegrityTasks();
|
await refreshIntegrityTasks();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user