spaces: Strip the trailing username when configuring
This commit is contained in:
@@ -49,7 +49,11 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
|
||||
// fill relevant info from the app
|
||||
$scope.appConfigure.app = app;
|
||||
$scope.appConfigure.location = app.location;
|
||||
if ($scope.user.admin) {
|
||||
$scope.appConfigure.location = app.location;
|
||||
} else { // strip the trailing username
|
||||
$scope.appConfigure.location = app.location === $scope.user.username ? '' : app.location.replace(new RegExp('-' + $scope.user.username + '$'),'');
|
||||
}
|
||||
$scope.appConfigure.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0];
|
||||
$scope.appConfigure.portBindingsInfo = angular.extend({}, app.manifest.tcpPorts, app.manifest.udpPorts); // Portbinding map only for information
|
||||
$scope.appConfigure.memoryLimit = app.memoryLimit || app.manifest.memoryLimit || (256 * 1024 * 1024);
|
||||
@@ -233,7 +237,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
});
|
||||
}
|
||||
|
||||
// reflect the new app state immediately
|
||||
// reflect the new app state immediately
|
||||
Client.refreshAppCache($scope.appRestore.app.id, waitForBackupFinish);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user