2019-01-24 00:40:24 +08:00
|
|
|
<div class="backup-options">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.localBackupStorage}}
|
|
|
|
<UppyBackupUploader
|
|
|
|
@done={{route-action "uploadSuccess"}}
|
|
|
|
@localBackupStorage={{this.localBackupStorage}}
|
|
|
|
/>
|
2019-01-24 00:40:24 +08:00
|
|
|
{{else}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
|
2019-01-24 00:40:24 +08:00
|
|
|
{{/if}}
|
2018-10-15 09:43:31 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.site.isReadOnly}}
|
|
|
|
<DButton
|
|
|
|
@icon="far-eye"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.toggleReadOnlyMode}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.status.isOperationRunning}}
|
|
|
|
@title="admin.backups.read_only.disable.title"
|
|
|
|
@label="admin.backups.read_only.disable.label"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2019-01-24 00:40:24 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@icon="far-eye"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.toggleReadOnlyMode}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.status.isOperationRunning}}
|
|
|
|
@title="admin.backups.read_only.enable.title"
|
|
|
|
@label="admin.backups.read_only.enable.label"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2019-01-24 00:40:24 +08:00
|
|
|
{{/if}}
|
2024-03-13 07:18:08 +08:00
|
|
|
<LinkTo @route="adminSiteSettingsCategory" @model="backups">
|
|
|
|
{{i18n "admin.backups.settings"}}
|
|
|
|
</LinkTo>
|
|
|
|
|
2019-11-27 01:55:25 +08:00
|
|
|
<div class="backup-message">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.status.restoreDisabled}}
|
2019-11-27 01:55:25 +08:00
|
|
|
<a href="site_settings/category/all_results?filter=allow_restore">{{d-icon
|
|
|
|
"info-circle"
|
|
|
|
}}
|
|
|
|
{{i18n "admin.backups.operations.restore.is_disabled"}}</a>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-01-24 00:40:24 +08:00
|
|
|
</div>
|
2018-07-03 11:14:53 +08:00
|
|
|
<table class="grid">
|
|
|
|
<thead>
|
2019-01-24 00:40:24 +08:00
|
|
|
<th width="55%">{{i18n "admin.backups.columns.filename"}}</th>
|
|
|
|
<th width="10%">{{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|}}
|
2014-02-13 12:35:46 +08:00
|
|
|
<tr>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="backup-filename">{{backup.filename}}</td>
|
|
|
|
<td class="backup-size">{{human-size backup.size}}</td>
|
|
|
|
<td class="backup-controls">
|
|
|
|
<div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.download backup}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="download"
|
|
|
|
@title="admin.backups.operations.download.title"
|
|
|
|
@label="admin.backups.operations.download.label"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default download"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.status.isOperationRunning}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@icon="far-trash-alt"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "destroyBackup") backup}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@disabled="true"
|
|
|
|
@title="admin.backups.operations.is_running"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@icon="play"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "startRestore") backup}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.status.restoreDisabled}}
|
|
|
|
@title={{this.restoreTitle}}
|
|
|
|
@label="admin.backups.operations.restore.label"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2015-03-27 01:05:27 +08:00
|
|
|
{{else}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@icon="far-trash-alt"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "destroyBackup") backup}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@title="admin.backups.operations.destroy.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
|
|
|
@icon="play"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "startRestore") backup}}
|
2022-07-06 01:41:31 +08:00
|
|
|
@disabled={{this.status.restoreDisabled}}
|
|
|
|
@title={{this.restoreTitle}}
|
|
|
|
@label="admin.backups.operations.restore.label"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default btn-restore"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2015-03-27 01:05:27 +08:00
|
|
|
{{/if}}
|
2014-04-23 17:20:22 +08:00
|
|
|
</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>
|