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.

52 lines
2.8 KiB
Handlebars
Raw Normal View History

<div class="backup-options">
{{#if this.localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{this.localBackupStorage}} />
{{else}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}}
{{#if this.site.isReadOnly}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.disable.title" @label="admin.backups.read_only.disable.label" />
{{else}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.enable.title" @label="admin.backups.read_only.enable.label" />
{{/if}}
<div class="backup-message">
{{#if this.status.restoreDisabled}}
<a href="site_settings/category/all_results?filter=allow_restore">{{d-icon "info-circle"}} {{i18n "admin.backups.operations.restore.is_disabled"}}</a>
{{/if}}
</div>
</div>
2018-07-02 23:14:53 -04: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-02 23:14:53 -04:00
</thead>
<tbody>
{{#each this.model as |backup|}}
2014-02-12 23:35:46 -05:00
<tr>
2018-07-02 23:14:53 -04:00
<td class="backup-filename">{{backup.filename}}</td>
<td class="backup-size">{{human-size backup.size}}</td>
<td class="backup-controls">
<div>
<DButton @class="btn-default download" @action={{action "download"}} @actionParam={{backup}} @icon="download" @title="admin.backups.operations.download.title" @label="admin.backups.operations.download.label" />
{{#if this.status.isOperationRunning}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @disabled="true" @title="admin.backups.operations.is_running" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
2015-03-26 13:05:27 -04:00
{{else}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @title="admin.backups.operations.destroy.title" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default btn-restore" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
2015-03-26 13:05:27 -04:00
{{/if}}
</div>
2014-02-12 23:35:46 -05:00
</td>
</tr>
{{else}}
<tr>
<td>{{i18n "admin.backups.none"}}</td>
2014-02-12 23:35:46 -05:00
<td></td>
<td></td>
</tr>
{{/each}}
2018-07-02 23:14:53 -04:00
</tbody>
2014-02-12 23:35:46 -05:00
</table>