fix(container-creation): match container_network by id (#3398)

pull/3402/head
William 2019-11-27 09:19:22 +13:00 committed by Anthony Lapenna
parent 1a65dbf85f
commit 7f54584ed6
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ function ($q, $scope, $async, $state, $timeout, $transition$, $filter, Container
var netContainer = $scope.config.HostConfig.NetworkMode.split(/^container:/)[1];
$scope.config.HostConfig.NetworkMode = 'container';
for (var c in $scope.runningContainers) {
if ($scope.runningContainers[c].Names && $scope.runningContainers[c].Names[0] === '/' + netContainer) {
if ($scope.runningContainers[c].Id == netContainer) {
$scope.formValues.NetworkContainer = $scope.runningContainers[c];
}
}