Use tabs instead of accordion for restore/clone ui
This commit is contained in:
+18
-7
@@ -205,13 +205,22 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
|
||||
createBackup: function () {
|
||||
Client.backupApp($scope.appRestore.app.id, function (error) {
|
||||
if (error) {
|
||||
Client.error(error);
|
||||
} else {
|
||||
$('#appRestoreModal').modal('hide');
|
||||
if (error) Client.error(error);
|
||||
|
||||
function waitForBackupFinish() {
|
||||
if ($scope.appRestore.app.installationState === 'pending_backup') return $timeout(waitForBackupFinish, 1000);
|
||||
|
||||
// we are done, refresh the backup list
|
||||
Client.getAppBackups($scope.appRestore.app.id, function (error, backups) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.appRestore.backups = backups;
|
||||
if (backups.length) $scope.appRestore.selectedBackup = backups[0]; // pre-select first backup
|
||||
});
|
||||
}
|
||||
|
||||
Client.refreshInstalledApps(); // reflect the new app state immediately
|
||||
// reflect the new app state immediately
|
||||
Client.refreshInstalledApps(waitForBackupFinish);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -372,8 +381,10 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
$scope.appRestore.portBindingsEnabled = {};
|
||||
$scope.appRestore.action = 'restore';
|
||||
|
||||
$scope.appRestoreForm.$setPristine();
|
||||
$scope.appRestoreForm.$setUntouched();
|
||||
if ($scope.appRestoreForm) {
|
||||
$scope.appRestoreForm.$setPristine();
|
||||
$scope.appRestoreForm.$setUntouched();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.readCertificate = function (event) {
|
||||
|
||||
Reference in New Issue
Block a user