2024-08-20 07:59:43 +08:00
|
|
|
<AdminPageSubheader @titleLabel="admin.backups.files_title">
|
2024-10-08 06:28:32 +08:00
|
|
|
<:actions as |actions|>
|
|
|
|
<actions.Wrapped as |wrapped|>
|
|
|
|
{{#if this.localBackupStorage}}
|
|
|
|
<UppyBackupUploader
|
|
|
|
class={{wrapped.buttonClass}}
|
|
|
|
@done={{route-action "uploadSuccess"}}
|
|
|
|
@localBackupStorage={{this.localBackupStorage}}
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
<UppyBackupUploader
|
|
|
|
class={{wrapped.buttonClass}}
|
|
|
|
@done={{route-action "remoteUploadSuccess"}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</actions.Wrapped>
|
2024-08-20 07:59:43 +08:00
|
|
|
</:actions>
|
|
|
|
</AdminPageSubheader>
|
|
|
|
|
|
|
|
{{#if this.status.restoreDisabled}}
|
|
|
|
<div class="backup-message alert alert-info">
|
2024-09-13 23:50:52 +08:00
|
|
|
{{dIcon "circle-info"}}
|
2024-08-21 11:23:24 +08:00
|
|
|
{{html-safe
|
|
|
|
(i18n
|
|
|
|
"admin.backups.operations.restore.is_disabled"
|
|
|
|
url=this.restoreSettingsUrl
|
|
|
|
)
|
|
|
|
}}
|
2019-11-27 01:55:25 +08:00
|
|
|
</div>
|
2024-08-20 07:59:43 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2024-10-24 06:26:21 +08:00
|
|
|
<table class="d-admin-table admin-backups-list">
|
2018-07-03 11:14:53 +08:00
|
|
|
<thead>
|
2024-10-24 06:26:21 +08:00
|
|
|
<th>{{i18n "admin.backups.columns.filename"}}</th>
|
|
|
|
<th>{{i18n "admin.backups.columns.size"}}</th>
|
2018-10-15 09:43:31 +08:00
|
|
|
<th></th>
|
2018-07-03 11:14:53 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.model as |backup|}}
|
2024-10-24 06:26:21 +08:00
|
|
|
<tr
|
|
|
|
class="d-admin-row__content backup-item-row"
|
|
|
|
data-backup-filename={{backup.filename}}
|
|
|
|
>
|
|
|
|
<td class="d-admin-row__detail">
|
|
|
|
<div class="backup-filename">
|
|
|
|
{{backup.filename}}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td class="d-admin-row__detail backup-size">
|
|
|
|
<div class="d-admin-row__mobile-label">
|
|
|
|
{{i18n "admin.backups.columns.size"}}
|
|
|
|
</div>
|
|
|
|
{{human-size backup.size}}
|
|
|
|
</td>
|
|
|
|
<td class="d-admin-row__controls backup-controls">
|
|
|
|
<div class="d-admin-row__controls-options">
|
|
|
|
<DButton
|
|
|
|
@action={{fn this.download backup}}
|
|
|
|
@title="admin.backups.operations.download.title"
|
|
|
|
@label="admin.backups.operations.download.label"
|
|
|
|
class="btn-default btn-small backup-item-row__download"
|
|
|
|
/>
|
2024-08-20 07:59:43 +08:00
|
|
|
|
2024-10-24 06:26:21 +08:00
|
|
|
<DMenu
|
|
|
|
@identifier="backup-item-menu"
|
|
|
|
@title={{i18n "more_options"}}
|
|
|
|
@icon="ellipsis-vertical"
|
|
|
|
class="btn-small"
|
|
|
|
>
|
|
|
|
<:content>
|
|
|
|
<DropdownMenu as |dropdown|>
|
|
|
|
<dropdown.item>
|
|
|
|
<DButton
|
|
|
|
@icon="trash-can"
|
|
|
|
@action={{fn (route-action "destroyBackup") backup}}
|
|
|
|
@disabled={{this.status.isOperationRunning}}
|
|
|
|
@title={{this.deleteTitle}}
|
|
|
|
@label="admin.backups.operations.destroy.title"
|
|
|
|
class="btn-transparent btn-danger backup-item-row__delete"
|
|
|
|
/>
|
|
|
|
</dropdown.item>
|
|
|
|
<dropdown.item>
|
|
|
|
<DButton
|
|
|
|
@icon="play"
|
|
|
|
@action={{fn (route-action "startRestore") backup}}
|
|
|
|
@disabled={{this.status.restoreDisabled}}
|
|
|
|
@title={{this.restoreTitle}}
|
|
|
|
@label="admin.backups.operations.restore.label"
|
|
|
|
class="btn-transparent backup-item-row__restore"
|
|
|
|
/>
|
|
|
|
</dropdown.item>
|
|
|
|
</DropdownMenu>
|
|
|
|
</:content>
|
|
|
|
</DMenu>
|
|
|
|
</div>
|
2014-02-13 12:35:46 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
<tr>
|
2019-01-24 00:40:24 +08:00
|
|
|
<td>{{i18n "admin.backups.none"}}</td>
|
2014-02-13 12:35:46 +08:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
2018-07-03 11:14:53 +08:00
|
|
|
</tbody>
|
2014-02-13 12:35:46 +08:00
|
|
|
</table>
|