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

52 lines
2.5 KiB
Handlebars
Raw Normal View History

2018-07-03 11:14:53 +08:00
<div class="backup-options">
{{#if localBackupStorage}}
{{resumable-upload target="/admin/backups/upload" success="uploadSuccess" error="uploadError" uploadText=uploadLabel title="admin.backups.upload.title" class="btn-default"}}
{{else}}
{{backup-uploader done="remoteUploadSuccess"}}
{{/if}}
2015-03-27 01:05:27 +08:00
{{#if site.isReadOnly}}
2018-12-18 22:58:11 +08:00
{{d-button class="btn-default" icon="far-eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.disable.title" label="admin.backups.read_only.disable.label"}}
2015-03-27 01:05:27 +08:00
{{else}}
2018-12-18 22:58:11 +08:00
{{d-button class="btn-default" icon="far-eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.enable.title" label="admin.backups.read_only.enable.label"}}
2015-03-27 01:05:27 +08:00
{{/if}}
</div>
2018-07-03 11:14:53 +08:00
<table class="grid">
<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 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>
{{d-button class="btn-default download"
action="download"
actionParam=backup
icon="download"
title="admin.backups.operations.download.title"
label="admin.backups.operations.download.label"}}
{{#if status.isOperationRunning}}
2018-12-18 22:58:11 +08:00
{{d-button icon="far-trash-alt" action="destroyBackup" actionParam=backup class="btn-danger" disabled="true" title="admin.backups.operations.is_running"}}
{{d-button icon="play" action="startRestore" actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}}
2015-03-27 01:05:27 +08:00
{{else}}
2018-12-18 22:58:11 +08:00
{{d-button icon="far-trash-alt" action="destroyBackup" actionParam=backup class="btn-danger" title="admin.backups.operations.destroy.title"}}
{{d-button icon="play" action="startRestore" actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}}
2015-03-27 01:05:27 +08:00
{{/if}}
</div>
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>