@ -11,6 +11,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
NetworkContainer : '' ,
NetworkContainer : '' ,
Labels : [ ] ,
Labels : [ ] ,
ExtraHosts : [ ] ,
ExtraHosts : [ ] ,
MacAddress : '' ,
IPv4 : '' ,
IPv4 : '' ,
IPv6 : '' ,
IPv6 : '' ,
AccessControlData : new AccessControlFormData ( ) ,
AccessControlData : new AccessControlFormData ( ) ,
@ -34,6 +35,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
Image : '' ,
Image : '' ,
Env : [ ] ,
Env : [ ] ,
Cmd : '' ,
Cmd : '' ,
MacAddress : '' ,
ExposedPorts : { } ,
ExposedPorts : { } ,
HostConfig : {
HostConfig : {
RestartPolicy : {
RestartPolicy : {
@ -193,6 +195,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
config . Hostname = '' ;
config . Hostname = '' ;
}
}
config . HostConfig . NetworkMode = networkMode ;
config . HostConfig . NetworkMode = networkMode ;
config . MacAddress = $scope . formValues . MacAddress ;
config . NetworkingConfig . EndpointsConfig [ networkMode ] = {
config . NetworkingConfig . EndpointsConfig [ networkMode ] = {
IPAMConfig : {
IPAMConfig : {
@ -387,6 +390,8 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
}
}
}
}
$scope . config . NetworkingConfig . EndpointsConfig [ $scope . config . HostConfig . NetworkMode ] = d . NetworkSettings . Networks [ $scope . config . HostConfig . NetworkMode ] ;
$scope . config . NetworkingConfig . EndpointsConfig [ $scope . config . HostConfig . NetworkMode ] = d . NetworkSettings . Networks [ $scope . config . HostConfig . NetworkMode ] ;
// Mac Address
$scope . formValues . MacAddress = d . NetworkSettings . Networks [ $scope . config . HostConfig . NetworkMode ] . MacAddress ;
// ExtraHosts
// ExtraHosts
for ( var h in $scope . config . HostConfig . ExtraHosts ) {
for ( var h in $scope . config . HostConfig . ExtraHosts ) {
if ( { } . hasOwnProperty . call ( $scope . config . HostConfig . ExtraHosts , h ) ) {
if ( { } . hasOwnProperty . call ( $scope . config . HostConfig . ExtraHosts , h ) ) {
@ -396,7 +401,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
}
}
}
}
function loadFromContainerEnv r ionmentVariables( d ) {
function loadFromContainerEnv ir onmentVariables( d ) {
var envArr = [ ] ;
var envArr = [ ] ;
for ( var e in $scope . config . Env ) {
for ( var e in $scope . config . Env ) {
if ( { } . hasOwnProperty . call ( $scope . config . Env , e ) ) {
if ( { } . hasOwnProperty . call ( $scope . config . Env , e ) ) {
@ -478,7 +483,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
loadFromContainerPortBindings ( d ) ;
loadFromContainerPortBindings ( d ) ;
loadFromContainerVolumes ( d ) ;
loadFromContainerVolumes ( d ) ;
loadFromContainerNetworkConfig ( d ) ;
loadFromContainerNetworkConfig ( d ) ;
loadFromContainerEnv r ionmentVariables( d ) ;
loadFromContainerEnv ir onmentVariables( d ) ;
loadFromContainerLabels ( d ) ;
loadFromContainerLabels ( d ) ;
loadFromContainerConsole ( d ) ;
loadFromContainerConsole ( d ) ;
loadFromContainerDevices ( d ) ;
loadFromContainerDevices ( d ) ;