discourse/app/assets/javascripts/admin/addon/templates/backups-index.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
2.8 KiB
Handlebars
Raw Normal View History

<AdminPageSubheader @titleLabel="admin.backups.files_title">
<:actions>
{{#if this.localBackupStorage}}
<UppyBackupUploader
@done={{route-action "uploadSuccess"}}
@localBackupStorage={{this.localBackupStorage}}
/>
{{else}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}}
</:actions>
</AdminPageSubheader>
{{#if this.status.restoreDisabled}}
<div class="backup-message alert alert-info">
{{dIcon "info-circle"}}
{{html-safe
(i18n
"admin.backups.operations.restore.is_disabled"
url=this.restoreSettingsUrl
)
}}
</div>
{{/if}}
<table class="grid admin-backups-list">
2018-07-03 11:14:53 +08:00
<thead>
<th width="55%">{{i18n "admin.backups.columns.filename"}}</th>
<th width="10%">{{i18n "admin.backups.columns.size"}}</th>
<th></th>
2018-07-03 11:14:53 +08:00
</thead>
<tbody>
{{#each this.model as |backup|}}
<tr class="backup-item-row" data-backup-filename={{backup.filename}}>
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">
<DButton
@action={{fn this.download backup}}
@icon="download"
@title="admin.backups.operations.download.title"
@label="admin.backups.operations.download.label"
class="btn-default btn-small backup-item-row__download"
/>
<DMenu
@identifier="backup-item-menu"
@title={{i18n "more_options"}}
@icon="ellipsis-v"
class="btn-small"
>
<:content>
<DropdownMenu as |dropdown|>
<dropdown.item>
<DButton
@icon="far-trash-alt"
@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>
2014-02-13 12:35:46 +08:00
</td>
</tr>
{{else}}
<tr>
<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>