Remove spaces code

This commit is contained in:
Girish Ramakrishnan
2019-05-04 18:40:10 -07:00
parent e7f614cdf3
commit 34eadebe00
6 changed files with 11 additions and 39 deletions

View File

@@ -17,7 +17,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.groups = [];
$scope.users = [];
$scope.backupConfig = {};
$scope.spacesSuffix = '';
$scope.disableIndexingTemplate = '# Disable search engine indexing\n\nUser-agent: *\nDisallow: /';
$scope.appConfigure = {
@@ -63,11 +62,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
// fill relevant info from the app
$scope.appConfigure.app = app;
if ($scope.user.admin) {
$scope.appConfigure.location = app.location;
} else { // strip the trailing username in spaces mode
$scope.appConfigure.location = app.location === $scope.spacesSuffix ? '' : app.location.replace(new RegExp('-' + $scope.spacesSuffix + '$'),'');
}
$scope.appConfigure.location = app.location;
$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);
@@ -684,9 +679,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
Client.onReady(function () {
refreshInstalledApps(); // refresh the new list immediately when switching from another view (appstore)
$scope.spacesSuffix = $scope.user.username.replace(/\./g, '-');
if ($scope.user.admin || $scope.config.features.spaces) {
if ($scope.user.admin) {
fetchUsers();
fetchGroups();
getDomains();