mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(container-edit): fix an issue related to missing extra hosts in network config (#1862)
This commit is contained in:
parent
e0cf088428
commit
77a85bd385
1 changed files with 5 additions and 5 deletions
|
@ -388,13 +388,13 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
||||||
// Mac Address
|
// Mac Address
|
||||||
$scope.formValues.MacAddress = d.NetworkSettings.Networks[$scope.config.HostConfig.NetworkMode].MacAddress;
|
$scope.formValues.MacAddress = d.NetworkSettings.Networks[$scope.config.HostConfig.NetworkMode].MacAddress;
|
||||||
// ExtraHosts
|
// ExtraHosts
|
||||||
for (var h in $scope.config.HostConfig.ExtraHosts) {
|
var extraHosts = $scope.config.HostConfig.ExtraHosts;
|
||||||
if ({}.hasOwnProperty.call($scope.config.HostConfig.ExtraHosts, h)) {
|
for (var i = 0; i < extraHosts.length; i++) {
|
||||||
$scope.formValues.ExtraHosts.push({'value': $scope.config.HostConfig.ExtraHosts[h]});
|
var host = extraHosts[i];
|
||||||
|
$scope.formValues.ExtraHosts.push({ 'value': host });
|
||||||
|
}
|
||||||
$scope.config.HostConfig.ExtraHosts = [];
|
$scope.config.HostConfig.ExtraHosts = [];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadFromContainerEnvironmentVariables(d) {
|
function loadFromContainerEnvironmentVariables(d) {
|
||||||
var envArr = [];
|
var envArr = [];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue