repair: reinstall if no backup
This commit is contained in:
@@ -1411,7 +1411,11 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
// this also happens for import faliures. this UI can only show backup listing. use CLI for arbit id/config
|
||||
case ISTATES.PENDING_RESTORE:
|
||||
repairFunc = Client.restoreApp.bind(null, $scope.app.id, $scope.repair.backupId);
|
||||
if ($scope.repair.backups.length === 0) { // this can happen when you give some invalid backup via CLI and restore via UI
|
||||
repairFunc = Client.repairApp.bind(null, $scope.app.id, {}); // this will trigger a re-install
|
||||
} else {
|
||||
repairFunc = Client.restoreApp.bind(null, $scope.app.id, $scope.repair.backupId);
|
||||
}
|
||||
break;
|
||||
|
||||
case ISTATES.PENDING_UNINSTALL:
|
||||
|
||||
Reference in New Issue
Block a user