restore UI fixes for encrypted backups
This commit is contained in:
+3
-2
@@ -34,6 +34,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
$scope.acceptSelfSignedCerts = false;
|
||||
$scope.format = 'tgz';
|
||||
$scope.advancedVisible = false;
|
||||
$scope.password = '';
|
||||
|
||||
$scope.sysinfo = {
|
||||
provider: 'generic',
|
||||
@@ -140,7 +141,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
$scope.s3like = function (provider) {
|
||||
return provider === 's3' || provider === 'minio' || provider === 's3-v4-compat' || provider === 'exoscale-sos'
|
||||
|| provider === 'digitalocean-spaces' || provider === 'wasabi' || provider === 'scaleway-objectstorage'
|
||||
|| provider === 'linode-objectstorage' || provider === 'ovh-storage';
|
||||
|| provider === 'linode-objectstorage' || provider === 'ovh-objectstorage';
|
||||
};
|
||||
|
||||
$scope.restore = function () {
|
||||
@@ -149,9 +150,9 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
|
||||
var backupConfig = {
|
||||
provider: $scope.provider,
|
||||
key: $scope.key,
|
||||
format: $scope.format
|
||||
};
|
||||
if ($scope.password) backupConfig.password = $scope.password;
|
||||
|
||||
// only set provider specific fields, this will clear them in the db
|
||||
if ($scope.s3like(backupConfig.provider)) {
|
||||
|
||||
+2
-2
@@ -172,8 +172,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': error.key }" ng-show="provider !== 'noop'">
|
||||
<label class="control-label" for="inputConfigureBackupKey">Encryption key (optional)</label>
|
||||
<input type="text" class="form-control" ng-model="key" id="inputConfigureBackupKey" name="prefix" ng-disabled="busy" placeholder="Passphrase used to encrypt the backups">
|
||||
<label class="control-label" for="inputConfigureBackupPassword">Encryption password (optional)</label>
|
||||
<input type="text" class="form-control" ng-model="password" id="inputConfigureBackupPassword" name="prefix" ng-disabled="busy" placeholder="Passphrase used to encrypt the backups">
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="configureBackupForm.$invalid"/>
|
||||
|
||||
Reference in New Issue
Block a user