Improve memory limit ui

This commit is contained in:
Johannes Zellner
2016-02-11 16:31:11 +01:00
parent 402385faca
commit a7bf043a9e
3 changed files with 6 additions and 4 deletions

View File

@@ -73,10 +73,10 @@
</div>
<div class="form-group" ng-hide="true">
<label class="control-label" for="memoryUsage">Maximum Memory Usage in Megabytes</label>
<br/><br/>
<label class="control-label" for="memoryUsage">Maximum Memory Usage: <b>{{ appConfigure.memoryUsage }} MB</b></label>
<br/>
<div style="padding: 0 10px;">
<slider id="memoryUsage" ng-model="appConfigure.memoryUsage" min="0" step="8" max="100" tooltip="always" ticks="memoryTicks" ticks-snap-bounds="30"></slider>
<slider id="memoryUsage" ng-model="appConfigure.memoryUsage" min="0" step="32" max="100" tooltip="hide" ticks="memoryTicks" ticks-snap-bounds="64"></slider>
</div>
</div>

View File

@@ -70,6 +70,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.certificateFileName = '';
$scope.appConfigure.keyFile = null;
$scope.appConfigure.keyFileName = '';
$scope.appConfigure.memoryLimit = 256;
$scope.appConfigure.accessRestrictionOption = '';
$scope.appConfigure.accessRestriction = { users: [], groups: [] };
@@ -149,6 +150,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.memoryUsage = app.memoryUsage || 256;
// fill the portBinding structures. There might be holes in the app.portBindings, which signalizes a disabled port
for (var env in $scope.appConfigure.portBindingsInfo) {