Merge pull request #121 from cristiangauma/master

Adding protocol select menu in portBinding during container creation
pull/2/head
Kevan Ahlquist 10 years ago
commit 419bf0aa77

@ -83,6 +83,9 @@ function($scope, $routeParams, $location, Container, Messages, containernameFilt
var PortBindings = {}; var PortBindings = {};
config.HostConfig.PortBindings.forEach(function(portBinding) { config.HostConfig.PortBindings.forEach(function(portBinding) {
var intPort = portBinding.intPort + "/tcp"; var intPort = portBinding.intPort + "/tcp";
if (portBinding.protocol === "udp") {
intPort = portBinding.intPort + "/udp";
}
var binding = { var binding = {
HostIp: portBinding.ip, HostIp: portBinding.ip,
HostPort: portBinding.extPort HostPort: portBinding.extPort

@ -289,6 +289,10 @@
<input type="text" ng-model="portBinding.extPort" class="form-control" placeholder="Host Port"/> <input type="text" ng-model="portBinding.extPort" class="form-control" placeholder="Host Port"/>
<label class="sr-only">Container port:</label> <label class="sr-only">Container port:</label>
<input type="text" ng-model="portBinding.intPort" class="form-control" placeholder="Container Port"/> <input type="text" ng-model="portBinding.intPort" class="form-control" placeholder="Container Port"/>
<select ng-model="portBinding.protocol">
<option value="">tcp</option>
<option value="udp">udp</option>
</select>
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.PortBindings, portBinding)">Remove</button> <button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.PortBindings, portBinding)">Remove</button>
</div> </div>
</div> </div>

Loading…
Cancel
Save