Improve app backup view

This commit is contained in:
Johannes Zellner
2019-09-17 16:16:48 +02:00
parent e1e0f2944b
commit ed90dbe7b7
2 changed files with 53 additions and 43 deletions

View File

@@ -200,7 +200,9 @@
<fieldset>
<form role="form" name="locationForm" ng-submit="location.submit()" autocomplete="off">
<div class="form-group" ng-class="{ 'has-error': (locationForm.location.$dirty && locationForm.location.$invalid) || (!locationForm.location.$dirty && location.error.location) }">
<label class="control-label" for="locationLocationInput">{{ location.error.location }} </label>
<label class="control-label">Location</label>
<div class="has-error" ng-show="location.error.location">{{ location.error.location }}</div>
<div class="input-group form-inline">
<input type="text" class="form-control" ng-model="location.location" id="locationLocationInput" name="location" placeholder="{{ 'Leave empty to use bare domain' }}" autofocus>
@@ -456,15 +458,16 @@
<div class="row">
<div class="col-md-12">
Last updated <span class="app-info-meta text-small">{{ app.updateTime | prettyDate }}</span>
<br/>
Automatic Updates <span class="app-info-meta text-small">{{ updates.enableAutomaticUpdate ? 'Enabled' : 'Disabled' }}</span>
<br/>
<br/>
</div>
</div>
<div class="row">
<div class="col-md-6">
<input type="checkbox" id="updatesEnableAutomaticUpdate" ng-model="updates.enableAutomaticUpdate">
<label class="control-label" for="updatesEnableAutomaticUpdate">Enable automatic updates</label>
</div>
<div class="col-md-6 text-right">
<button class="btn btn-outline btn-primary pull-right" ng-click="updates.submit()" ng-disabled="updates.enableAutomaticUpdate === updates.currentEnableAutomaticUpdate || updates.busy"><i class="fa fa-circle-notch fa-spin" ng-show="updates.busy"></i> Save</button>
<div class="col-md-12">
<button class="btn btn-danger" ng-click="updates.toggleAutomaticUpdates()" ng-disabled="updates.busy"><i class="fa fa-circle-notch fa-spin" ng-show="updates.busy"></i> {{ updates.enableAutomaticUpdate ? 'Disable' : 'Enable' }} Automatic Updates</button>
<button class="btn btn-primary pull-right" ng-click="updates.check()" ng-disabled="updates.busyCheck"><i class="fa fa-circle-notch fa-spin" ng-show="updates.busyCheck"></i> Check for Updates</button>
</div>
</div>
</div>
@@ -504,8 +507,16 @@
<br/>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-6">
<div class="col-md-12">
<button class="btn btn-danger" ng-click="backups.toggleAutomaticBackups()" ng-disabled="backups.busy"><i class="fa fa-circle-notch fa-spin" ng-show="backups.busy"></i> {{ backups.enableBackup ? 'Disable' : 'Enable' }} Automatic Daily Backups</button>
<button type="button" class="btn btn-primary pull-right" ng-click="backups.createBackup()" ng-disabled="app.taskId"><i class="fa fa-circle-notch fa-spin" ng-show="app.installationState === 'pending_backup'"></i> Create Backup</button>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<div ng-show="app.installationState === 'pending_backup'">
<div class="progress progress-striped active animateMe" style="margin-bottom: 10px;">
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ app.progress }}%"></div>
@@ -513,19 +524,6 @@
<div><center>{{ app.message }}</center></div>
</div>
</div>
<div class="col-md-6 text-right">
<button type="button" class="btn btn-primary pull-right" ng-click="backups.createBackup()" ng-disabled="app.taskId"><i class="fa fa-circle-notch fa-spin" ng-show="app.installationState === 'pending_backup'"></i> Create Backup</button>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-6">
<input type="checkbox" id="backupsEnableBackup" ng-model="backups.enableBackup">
<label class="control-label" for="backupsEnableBackup">Enable automatic daily backups</label>
</div>
<div class="col-md-6 text-right">
<button type="button" class="btn btn-primary" ng-click="backups.submit()" ng-disabled="backups.enableBackup === backups.currentEnableBackup || backups.busy"><i class="fa fa-circle-notch fa-spin" ng-show="backups.busy"></i> Save</button>
</div>
</div>
</div>