Allow setting memory limit to 0 for default

Part of #18
This commit is contained in:
Girish Ramakrishnan
2016-09-04 11:44:29 -07:00
parent 31636af643
commit 4a827dcfb3
2 changed files with 3 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.users = [];
$scope.memoryTicks = [
0, // result to default memory limit
256 * 1024 * 1024,
512 * 1024 * 1024,
1024 * 1024 * 1024,
@@ -179,7 +180,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.portBindingsInfo = app.manifest.tcpPorts || {}; // Portbinding map only for information
$scope.appConfigure.accessRestrictionOption = app.accessRestriction ? 'restricted' : '';
$scope.appConfigure.accessRestriction = app.accessRestriction || { users: [], groups: [] };
$scope.appConfigure.memoryLimit = app.memoryLimit || 256;
$scope.appConfigure.memoryLimit = app.memoryLimit;
$scope.appConfigure.xFrameOptions = app.xFrameOptions.indexOf('ALLOW-FROM') === 0 ? app.xFrameOptions.split(' ')[1] : '';
// fill the portBinding structures. There might be holes in the app.portBindings, which signalizes a disabled port