Just hide the table altogether when no backup

This commit is contained in:
Girish Ramakrishnan
2020-02-06 16:11:21 -08:00
parent be1874839e
commit ba36f05182

View File

@@ -720,9 +720,6 @@
<label class="control-label">Backups</label>
<div>
<button type="button" class="btn btn-primary pull-right" ng-click="backups.createBackup()" ng-disabled="app.taskId || backups.busyCreate || app.error" tooltip-enable="app.error" uib-tooltip="App is in error state">
<i class="fa fa-circle-notch fa-spin" ng-show="app.installationState === 'pending_backup' || backups.busyCreate"></i> Create Backup
</button>
<span>Backups are complete snapshots of the app. You can use app backups to restore or clone this app.</span>
</div>
@@ -731,7 +728,7 @@
<!-- backup id copy helper -->
<input type="text" class="offscreen" aria-hidden="true" id="backupIdHelper" value="">
<table class="table table-hover" style="margin: 0;">
<table ng-hide="!backups.backups.length" class="table table-hover" style="margin: 0;">
<thead>
<tr>
<th width="25px">&nbsp;</th>
@@ -740,9 +737,6 @@
</tr>
</thead>
<tbody>
<tr ng-hide="backups.backups.length">
<td colspan="4" class="text-center">This app has no backups yet.</td>
</tr>
<tr ng-repeat="backup in backups.backups">
<td><div ng-click="backups.copyBackupId(backup)" class="hand" uib-tooltip="{{ backups.copyBackupIdDone ? 'Copied to clipboard' : 'Click to copy backup id' }}" tooltip-placement="right"><i class="fa fa-copy"></i></div></td>
<td><div uib-tooltip="{{ backup.creationTime | prettyLongDate }}">v{{ backup.version }} - {{ backup.creationTime | prettyDate }}</div></td>
@@ -753,6 +747,12 @@
</tr>
</tbody>
</table>
<br/>
<button type="button" class="btn btn-primary pull-right" ng-click="backups.createBackup()" ng-disabled="app.taskId || backups.busyCreate || app.error" tooltip-enable="app.error" uib-tooltip="App is in error state">
<i class="fa fa-circle-notch fa-spin" ng-show="app.installationState === 'pending_backup' || backups.busyCreate"></i> Create Backup
</button>
</div>
</div>
<hr/>