Add nfs storage provider

This commit is contained in:
Johannes Zellner
2020-06-22 15:51:18 +02:00
parent 4db07b5254
commit c9ba4ba50a
2 changed files with 14 additions and 9 deletions
+7 -2
View File
@@ -80,13 +80,14 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.storageProvider = [
{ name: 'Amazon S3', value: 's3' },
{ name: 'CIFS/Samba Mount', value: 'cifs' },
{ name: 'CIFS Mount', value: 'cifs' },
{ name: 'DigitalOcean Spaces', value: 'digitalocean-spaces' },
{ name: 'Exoscale SOS', value: 'exoscale-sos' },
{ name: 'Filesystem', value: 'filesystem' },
{ name: 'Google Cloud Storage', value: 'gcs' },
{ name: 'Linode Object Storage', value: 'linode-objectstorage' },
{ name: 'Minio', value: 'minio' },
{ name: 'NFS Mount', value: 'nfs' },
{ name: 'OVH Object Storage', value: 'ovh-objectstorage' },
{ name: 'S3 API Compatible (v4)', value: 's3-v4-compat' },
{ name: 'Scaleway Object Storage', value: 'scaleway-objectstorage' },
@@ -246,6 +247,10 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|| provider === 'linode-objectstorage' || provider === 'ovh-objectstorage';
};
$scope.mountlike = function (provider) {
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs';
};
// https://stackoverflow.com/questions/3665115/how-to-create-a-file-in-memory-for-user-to-download-but-not-through-server#18197341
function download(filename, text) {
var element = document.createElement('a');
@@ -467,7 +472,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.configureBackup.busy = false;
return;
}
} else if (backupConfig.provider === 'sshfs' || backupConfig.provider === 'cifs') {
} else if (backupConfig.provider === 'sshfs' || backupConfig.provider === 'cifs' || backupConfig.provider === 'nfs') {
backupConfig.mountPoint = $scope.configureBackup.mountPoint;
backupConfig.prefix = $scope.configureBackup.prefix;
backupConfig.noHardlinks = !$scope.configureBackup.useHardlinks;