2017-03-20 20:28:09 +00:00
|
|
|
<div>
|
|
|
|
<rd-widget>
|
2022-07-19 03:29:50 +00:00
|
|
|
<rd-widget-header icon="list" feather-icon="true" title-text="Published ports">
|
2019-05-24 06:04:58 +00:00
|
|
|
<div class="nopadding" authorization="DockerServiceUpdate">
|
2022-08-12 03:47:56 +00:00
|
|
|
<a class="btn btn-secondary btn-sm pull-right" ng-click="isUpdating ||addPublishedPort(service)" ng-disabled="isUpdating">
|
|
|
|
<pr-icon icon="'plus'" feather="true"></pr-icon> port mapping
|
2017-03-20 20:28:09 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</rd-widget-header>
|
|
|
|
<rd-widget-body ng-if="!service.Ports || service.Ports.length === 0">
|
|
|
|
<p>This service has no ports published.</p>
|
|
|
|
</rd-widget-body>
|
|
|
|
<rd-widget-body ng-if="service.Ports && service.Ports.length > 0" classes="no-padding">
|
2020-04-10 21:54:53 +00:00
|
|
|
<table class="table">
|
2017-03-20 20:28:09 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Host port</th>
|
|
|
|
<th>Container port</th>
|
|
|
|
<th>Protocol</th>
|
2017-05-04 07:43:20 +00:00
|
|
|
<th>Publish mode</th>
|
2020-01-31 15:49:59 +00:00
|
|
|
<th authorization="DockerServiceUpdate">Actions</th>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="portBinding in service.Ports">
|
|
|
|
<td>
|
|
|
|
<div class="input-group input-group-sm">
|
|
|
|
<span class="input-group-addon">host</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="portBinding.PublishedPort"
|
|
|
|
placeholder="e.g. 8080"
|
|
|
|
ng-change="updatePublishedPort(service, mapping)"
|
|
|
|
ng-disabled="isUpdating"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2017-03-20 20:28:09 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="input-group input-group-sm">
|
|
|
|
<span class="input-group-addon">container</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="portBinding.TargetPort"
|
|
|
|
placeholder="e.g. 80"
|
|
|
|
ng-change="updatePublishedPort(service, mapping)"
|
|
|
|
ng-disabled="isUpdating"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2017-03-20 20:28:09 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="input-group input-group-sm">
|
2020-04-10 21:54:53 +00:00
|
|
|
<select
|
|
|
|
class="selectpicker form-control"
|
|
|
|
ng-model="portBinding.Protocol"
|
|
|
|
ng-change="updatePublishedPort(service, mapping)"
|
|
|
|
ng-disabled="isUpdating"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
>
|
2017-03-20 20:28:09 +00:00
|
|
|
<option value="tcp">tcp</option>
|
|
|
|
<option value="udp">udp</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</td>
|
2017-05-04 07:43:20 +00:00
|
|
|
<td>
|
|
|
|
<div class="input-group input-group-sm">
|
2020-04-10 21:54:53 +00:00
|
|
|
<select
|
|
|
|
class="selectpicker form-control"
|
|
|
|
ng-model="portBinding.PublishMode"
|
|
|
|
ng-change="updatePublishedPort(service, mapping)"
|
|
|
|
ng-disabled="isUpdating"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
>
|
2017-05-04 07:43:20 +00:00
|
|
|
<option value="ingress">ingress</option>
|
|
|
|
<option value="host">host</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</td>
|
2019-05-24 06:04:58 +00:00
|
|
|
<td authorization="DockerServiceUpdate">
|
2017-03-20 20:28:09 +00:00
|
|
|
<span class="input-group-btn">
|
2022-07-26 23:18:06 +00:00
|
|
|
<button class="btn btn-light" type="button" ng-click="removePortPublishedBinding(service, $index)" ng-disabled="isUpdating">
|
2022-08-03 00:56:29 +00:00
|
|
|
<pr-icon icon="'trash-2'" feather="true" class-name="'icon-secondary icon-md'"></pr-icon>
|
2017-03-20 20:28:09 +00:00
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2019-05-24 06:04:58 +00:00
|
|
|
<rd-widget-footer authorization="DockerServiceUpdate">
|
2017-07-08 08:23:00 +00:00
|
|
|
<div class="btn-toolbar" role="toolbar">
|
2017-03-20 20:28:09 +00:00
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!hasChanges(service, ['Ports'])" ng-click="updateService(service)">Apply changes</button>
|
|
|
|
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a ng-click="cancelChanges(service, ['Ports'])">Reset changes</a></li>
|
|
|
|
<li><a ng-click="cancelChanges(service)">Reset all changes</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</rd-widget-footer>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|