feat(services): ability to publish ports using host mode (#838)

This commit is contained in:
Glowbal
2017-05-04 09:43:20 +02:00
committed by Anthony Lapenna
parent 43e1f25f89
commit df3a529f0a
4 changed files with 20 additions and 6 deletions
@@ -29,7 +29,7 @@ function ($scope, $state, Service, ServiceHelper, Volume, Network, ImageHelper,
};
$scope.addPortBinding = function() {
$scope.formValues.Ports.push({ PublishedPort: '', TargetPort: '', Protocol: 'tcp' });
$scope.formValues.Ports.push({ PublishedPort: '', TargetPort: '', Protocol: 'tcp', PublishMode: 'ingress' });
};
$scope.removePortBinding = function(index) {
@@ -96,7 +96,8 @@ function ($scope, $state, Service, ServiceHelper, Volume, Network, ImageHelper,
var ports = [];
input.Ports.forEach(function (binding) {
var port = {
Protocol: binding.Protocol
Protocol: binding.Protocol,
PublishMode: binding.PublishMode
};
if (binding.TargetPort) {
port.TargetPort = +binding.TargetPort;