diff --git a/src/js/client.js b/src/js/client.js index 70e6b81b4..64d80ad42 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1225,9 +1225,9 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; - Client.prototype.importBackup = function (appId, backupId, backupFormat, backupConfig, callback) { + Client.prototype.importBackup = function (appId, remotePath, backupFormat, backupConfig, callback) { var data = { - backupId: backupId, + remotePath: remotePath, backupFormat: backupFormat, backupConfig: backupConfig, }; @@ -3321,7 +3321,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout return 'Cloudron was setup'; case ACTION_RESTORE: - return 'Cloudron was restored using backup ' + data.backupId; + return 'Cloudron was restored using backup ' + data.remotePath; case ACTION_APP_CONFIGURE: { if (!data.app) return ''; @@ -3410,14 +3410,14 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout // older versions (<3.5) did not have these fields if (data.fromManifest) details += ' from version ' + data.fromManifest.version; if (data.toManifest) details += ' to version ' + data.toManifest.version; - if (data.backupId) details += ' using backup ' + data.backupId; + if (data.remotePath) details += ' using backup ' + data.remotePath; return details; case ACTION_APP_IMPORT: if (!data.app) return ''; details = appName('', data.app, 'App') + 'was imported'; if (data.toManifest) details += ' to version ' + data.toManifest.version; - if (data.backupId) details += ' using backup ' + data.backupId; + if (data.remotePath) details += ' using backup ' + data.remotePath; return details; case ACTION_APP_UNINSTALL: @@ -3441,16 +3441,16 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout if (data.errorMessage) { return 'Backup ' + appName('of', data.app) + ' failed: ' + data.errorMessage; } else { - return 'Backup ' + appName('of', data.app) + ' succeeded with backup id ' + data.backupId; + return 'Backup ' + appName('of', data.app) + ' succeeded with backup id ' + data.backupId + ' at ' + data.remotePath; } case ACTION_APP_CLONE: if (appIdContext === data.oldAppId) { - return 'App was cloned to ' + data.newApp.fqdn + ' using backup ' + data.backupId; + return 'App was cloned to ' + data.newApp.fqdn + ' using backup ' + data.remotePath; } else if (appIdContext === data.appId) { - return 'App was cloned from ' + data.oldApp.fqdn + ' using backup ' + data.backupId; + return 'App was cloned from ' + data.oldApp.fqdn + ' using backup ' + data.remotePath; } else { - return appName('', data.newApp, 'App') + ' was cloned ' + appName('from', data.oldApp) + ' using backup ' + data.backupId; + return appName('', data.newApp, 'App') + ' was cloned ' + appName('from', data.oldApp) + ' using backup ' + data.remotePath; } case ACTION_APP_REPAIR: @@ -3491,7 +3491,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout case ACTION_BACKUP_FINISH: if (!errorMessage) { - return 'Cloudron backup created with Id ' + data.backupId; + return 'Cloudron backup created at ' + data.remotePath; } else { return 'Cloudron backup errored with error: ' + errorMessage; } diff --git a/src/js/restore.js b/src/js/restore.js index 9d18af0f4..3bf8c0aa4 100644 --- a/src/js/restore.js +++ b/src/js/restore.js @@ -30,7 +30,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien $scope.region = ''; $scope.endpoint = ''; $scope.backupFolder = ''; - $scope.backupId = ''; + $scope.remotePath = ''; $scope.instanceId = ''; $scope.acceptSelfSignedCerts = false; $scope.format = 'tgz'; @@ -290,24 +290,24 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien backupConfig.backupFolder = $scope.backupFolder; } - if ($scope.backupId.indexOf('/') === -1) { + if ($scope.remotePath.indexOf('/') === -1) { $scope.error.generic = 'Backup id must include the directory path'; - $scope.error.backupId = true; + $scope.error.remotePath = true; $scope.busy = false; return; } - if ($scope.backupId.indexOf('box') === -1) { + if ($scope.remotePath.indexOf('box') === -1) { $scope.error.generic = 'Backup id must contain "box"'; - $scope.error.backupId = true; + $scope.error.remotePath = true; $scope.busy = false; return; } - var version = $scope.backupId.match(/_v(\d+.\d+.\d+)/); + var version = $scope.remotePath.match(/_v(\d+.\d+.\d+)/); if (!version) { $scope.error.generic = 'Backup id is missing version information'; - $scope.error.backupId = true; + $scope.error.remotePath = true; $scope.busy = false; return; } @@ -321,7 +321,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien sysinfoConfig.ifname = $scope.sysinfo.ifname; } - Client.restore(backupConfig, $scope.backupId.replace(/\.tar\.gz(\.enc)?$/, ''), version ? version[1] : '', sysinfoConfig, $scope.skipDnsSetup, $scope.setupToken, function (error) { + Client.restore(backupConfig, $scope.remotePath.replace(/\.tar\.gz(\.enc)?$/, ''), version ? version[1] : '', sysinfoConfig, $scope.skipDnsSetup, $scope.setupToken, function (error) { $scope.busy = false; if (error) { diff --git a/src/restore.html b/src/restore.html index 5f19e072b..6b8d1ba89 100644 --- a/src/restore.html +++ b/src/restore.html @@ -261,10 +261,10 @@ -