Update pankow to v4 to fix TableView bug
This commit is contained in:
@@ -61,6 +61,8 @@ const columns = ref({
|
||||
}
|
||||
});
|
||||
|
||||
const accessLevel = props.app.accessLevel;
|
||||
|
||||
function createActionMenu(backup) {
|
||||
return [{
|
||||
icon: 'fa-solid fa-info',
|
||||
@@ -69,27 +71,27 @@ function createActionMenu(backup) {
|
||||
}, {
|
||||
icon: 'fa-solid fa-pencil-alt',
|
||||
label: t('main.action.edit'),
|
||||
visible: props.app.accessLevel === 'admin',
|
||||
visible: accessLevel === 'admin',
|
||||
action: onEdit.bind(null, backup),
|
||||
}, {
|
||||
separator: true,
|
||||
}, {
|
||||
icon: 'fa-solid fa-download',
|
||||
label: t('app.backups.backups.downloadBackupTooltip'),
|
||||
visible: backup.site.format === 'tgz' && props.app.accessLevel === 'admin',
|
||||
visible: backup.site.format === 'tgz' && accessLevel === 'admin',
|
||||
href: getDownloadLink(backup),
|
||||
}, {
|
||||
icon: 'fa-solid fa-file-alt',
|
||||
label: t('app.backups.backups.downloadConfigTooltip'),
|
||||
visible: props.app.accessLevel === 'admin',
|
||||
visible: accessLevel === 'admin',
|
||||
action: onDownloadConfig.bind(null, backup),
|
||||
}, {
|
||||
separator: true,
|
||||
visible: props.app.accessLevel === 'admin',
|
||||
visible: accessLevel === 'admin',
|
||||
}, {
|
||||
icon: 'fa-solid fa-clone',
|
||||
label: t('app.backups.backups.cloneTooltip'),
|
||||
visible: props.app.accessLevel === 'admin',
|
||||
visible: accessLevel === 'admin',
|
||||
action: onClone.bind(null, backup),
|
||||
}, {
|
||||
icon: 'fa-solid fa-history',
|
||||
@@ -102,7 +104,7 @@ function createActionMenu(backup) {
|
||||
}, {
|
||||
icon: 'fa-solid fa-key',
|
||||
label: backup.integrityCheckTaskId ? t('backups.stopIntegrity') : t('backups.checkIntegrity'),
|
||||
visible: props.app.accessLevel === 'admin',
|
||||
visible: accessLevel === 'admin',
|
||||
action: backup.integrityCheckTaskId ? onStopIntegrityCheck.bind(null, backup) : onStartIntegrityCheck.bind(null, backup),
|
||||
}];
|
||||
}
|
||||
@@ -431,29 +433,29 @@ onUnmounted(() => {
|
||||
<br/>
|
||||
|
||||
<TableView :model="backups" :columns="columns" :busy="busy" :placeholder="$t('backups.listing.noBackups')" style="max-height: 400px;" >
|
||||
<template #creationTime="backup">
|
||||
<template #creationTime="{ item }">
|
||||
<div>
|
||||
<span>{{ prettyLongDate(backup.creationTime) }}</span>
|
||||
<span v-if="backup.label"> <b>{{ backup.label }}</b></span>
|
||||
<span> <i class="fa-solid fa-thumbtack text-muted" v-show="backup.preserveSecs === -1" v-tooltip="$t('backups.listing.tooltipPreservedBackup')"></i></span>
|
||||
<span>{{ prettyLongDate(item.creationTime) }}</span>
|
||||
<span v-if="item.label"> <b>{{ item.label }}</b></span>
|
||||
<span> <i class="fa-solid fa-thumbtack text-muted" v-show="item.preserveSecs === -1" v-tooltip="$t('backups.listing.tooltipPreservedBackup')"></i></span>
|
||||
</div>
|
||||
</template>
|
||||
<template #site="backup">
|
||||
{{ backup.site.name }}
|
||||
<template #site="{ item }">
|
||||
{{ item.site.name }}
|
||||
</template>
|
||||
<template #size="backup">
|
||||
<span v-if="backup.stats?.upload">{{ prettyFileSize(backup.stats.upload.size) }} - {{ backup.stats.upload.fileCount }} file(s)</span>
|
||||
<template #size="{ item }">
|
||||
<span v-if="item.stats?.upload">{{ prettyFileSize(item.stats.upload.size) }} - {{ item.stats.upload.fileCount }} file(s)</span>
|
||||
</template>
|
||||
<template #integrity="backup">
|
||||
<Spinner v-if="backup.integrityCheckTaskId && integrityTasks[backup.integrityCheckTaskId]" style="min-width: 0;"/>
|
||||
<div v-else-if="backup.lastIntegrityCheckTime" style="display: flex; align-items: center;">
|
||||
<i v-if="backup.integrityCheckStatus === 'passed'" class="fa-solid fa-check-circle" v-tooltip="prettyLongDate(backup.lastIntegrityCheckTime)"></i>
|
||||
<i v-else class="fa-solid fa-times-circle" v-tooltip="prettyLongDate(backup.lastIntegrityCheckTime)"></i>
|
||||
<template #integrity="{ item }">
|
||||
<Spinner v-if="item.integrityCheckTaskId && integrityTasks[item.integrityCheckTaskId]" style="min-width: 0;"/>
|
||||
<div v-else-if="item.lastIntegrityCheckTime" style="display: flex; align-items: center;">
|
||||
<i v-if="item.integrityCheckStatus === 'passed'" class="fa-solid fa-check-circle" v-tooltip="prettyLongDate(item.lastIntegrityCheckTime)"></i>
|
||||
<i v-else class="fa-solid fa-times-circle" v-tooltip="prettyLongDate(item.lastIntegrityCheckTime)"></i>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
<template #actions="backup">
|
||||
<ActionBar :actions="createActionMenu(backup)"/>
|
||||
<template #actions="{ item }">
|
||||
<ActionBar :actions="createActionMenu(item)"/>
|
||||
</template>
|
||||
</TableView>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user