restore: fix UI

This commit is contained in:
Girish Ramakrishnan
2021-06-22 14:29:51 -07:00
parent 5e5948ecd4
commit 1ee6560f30
3 changed files with 15 additions and 12 deletions

View File

@@ -261,11 +261,11 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
return;
}
} else if ($scope.mountlike(backupConfig.provider)) {
backupConfig.mountPoint = $scope.mountPoint;
backupConfig.prefix = $scope.prefix;
backupConfig.mountOptions = {};
if (backupConfig.provider === 'cifs' || backupConfig.provider === 'sshfs' || backupConfig.provider === 'nfs') {
backupConfig.mountPoint = '/mnt/cloudronbackup'; // harcoded for ease of use
backupConfig.mountOptions.host = $scope.mountOptions.host;
backupConfig.mountOptions.remoteDir = $scope.mountOptions.remoteDir;
@@ -278,9 +278,12 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
backupConfig.mountOptions.privateKey = $scope.mountOptions.privateKey;
}
} else if (backupConfig.provider === 'ext4') {
backupConfig.mountPoint = '/mnt/cloudronbackup'; // harcoded for ease of use
backupConfig.mountOptions.diskPath = $scope.diskPath;
} else if (backupConfig.provider === 'mountpoint') {
backupConfig.mountPoint = $scope.mountPoint;
}
} else if (backupConfig.provider === 'filesystem' || backupConfig.provider === 'mountpoint') {
} else if (backupConfig.provider === 'filesystem') {
backupConfig.backupFolder = $scope.configureBackup.backupFolder;
}