Add backup format to the backup UI
This commit is contained in:
@@ -177,12 +177,17 @@
|
||||
<input type="text" class="form-control" ng-model="configureBackup.secretAccessKey" id="inputConfigureBackupSecretAccessKey" name="secretAccessKey" ng-disabled="configureBackup.busy" ng-required="s3like(configureBackup.provider)">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="configureBackup.provider !== 'noop'">
|
||||
<label class="control-label" for="storageFormat">Storage Format</label>
|
||||
<select class="form-control" id="storageFormat" ng-model="configureBackup.format" ng-options="a.value as a.name for a in formats"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="configureBackup.provider !== 'noop'">
|
||||
<label class="control-label" for="storageRetention">Retention Time</label>
|
||||
<select class="form-control" id="storageRetention" ng-model="configureBackup.retentionSecs" ng-options="a.value as a.name for a in retentionTimes"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.key }" ng-show="configureBackup.provider !== 'noop'">
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.key }" ng-show="configureBackup.provider !== 'noop' && configureBackup.format === 'tgz'">
|
||||
<label class="control-label" for="inputConfigureBackupKey">Encryption key (optional)</label>
|
||||
<input type="text" class="form-control" ng-model="configureBackup.key" id="inputConfigureBackupKey" name="prefix" ng-disabled="configureBackup.busy" placeholder="Passphrase used to encrypt the backups">
|
||||
</div>
|
||||
|
||||
@@ -57,6 +57,11 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
{ name: 'Forever', value: -1 }
|
||||
];
|
||||
|
||||
$scope.formats = [
|
||||
{ name: 'Tarball (zipped)', value: 'tgz' },
|
||||
{ name: 'Flat file', value: 'flat-file' }
|
||||
];
|
||||
|
||||
$scope.planChange = {
|
||||
busy: false,
|
||||
error: {},
|
||||
@@ -313,6 +318,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
endpoint: '',
|
||||
backupFolder: '',
|
||||
retentionSecs: -1,
|
||||
format: 'tgz',
|
||||
|
||||
clearForm: function () {
|
||||
$scope.configureBackup.bucket = '';
|
||||
@@ -323,6 +329,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.configureBackup.region = '';
|
||||
$scope.configureBackup.backupFolder = '';
|
||||
$scope.configureBackup.retentionSecs = -1;
|
||||
$scope.configureBackup.format = 'tgz';
|
||||
},
|
||||
|
||||
show: function () {
|
||||
@@ -339,6 +346,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.configureBackup.key = $scope.backupConfig.key;
|
||||
$scope.configureBackup.backupFolder = $scope.backupConfig.backupFolder;
|
||||
$scope.configureBackup.retentionSecs = $scope.backupConfig.retentionSecs;
|
||||
$scope.configureBackup.format = $scope.backupConfig.format;
|
||||
|
||||
$('#configureBackupModal').modal('show');
|
||||
},
|
||||
@@ -351,7 +359,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
provider: $scope.configureBackup.provider,
|
||||
key: $scope.configureBackup.key,
|
||||
retentionSecs: $scope.configureBackup.retentionSecs,
|
||||
format: 'tgz'
|
||||
format: $scope.configureBackup.format
|
||||
};
|
||||
|
||||
// only set provider specific fields, this will clear them in the db
|
||||
|
||||
Reference in New Issue
Block a user