mirror of https://github.com/portainer/portainer
parent
55f719128b
commit
de9f99d030
|
@ -48,6 +48,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
||||||
Binds: [],
|
Binds: [],
|
||||||
NetworkMode: 'bridge',
|
NetworkMode: 'bridge',
|
||||||
Privileged: false,
|
Privileged: false,
|
||||||
|
Runtime: '',
|
||||||
ExtraHosts: [],
|
ExtraHosts: [],
|
||||||
Devices: [],
|
Devices: [],
|
||||||
CapAdd: [],
|
CapAdd: [],
|
||||||
|
@ -581,6 +582,14 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
||||||
|
|
||||||
SystemService.info()
|
SystemService.info()
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
|
var runtimes = data.Runtimes;
|
||||||
|
$scope.availableRuntimes = runtimes;
|
||||||
|
if ('runc' in runtimes) {
|
||||||
|
$scope.config.HostConfig.Runtime = 'runc';
|
||||||
|
}
|
||||||
|
else if (Object.keys(runtimes).length !== 0) {
|
||||||
|
$scope.config.HostConfig.Runtime = Object.keys(runtimes)[0];
|
||||||
|
}
|
||||||
$scope.state.sliderMaxCpu = 32;
|
$scope.state.sliderMaxCpu = 32;
|
||||||
if (data.NCPU) {
|
if (data.NCPU) {
|
||||||
$scope.state.sliderMaxCpu = data.NCPU;
|
$scope.state.sliderMaxCpu = data.NCPU;
|
||||||
|
|
|
@ -500,6 +500,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- !privileged-mode -->
|
<!-- !privileged-mode -->
|
||||||
|
<!-- runtimes -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="container_runtime" class="col-sm-2 col-lg-1 control-label text-left">Runtime</label>
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<select class="form-control" ng-model="config.HostConfig.Runtime" id="container_runtime">
|
||||||
|
<option selected disabled hidden value="">Select a runtime</option>
|
||||||
|
<option ng-repeat="(runtime, _) in availableRuntimes" ng-value="runtime">{{ runtime }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- !runtimes -->
|
||||||
</form>
|
</form>
|
||||||
<form class="form-horizontal" style="margin-top: 15px;">
|
<form class="form-horizontal" style="margin-top: 15px;">
|
||||||
<!-- devices -->
|
<!-- devices -->
|
||||||
|
|
Loading…
Reference in New Issue