2017-06-20 10:54:27 +00:00
|
|
|
<div id="service-network-specs">
|
2017-03-20 20:28:09 +00:00
|
|
|
<rd-widget>
|
2020-08-06 23:11:47 +00:00
|
|
|
<rd-widget-header icon="fa-tasks" title-text="Networks">
|
|
|
|
<div class="nopadding" authorization="DockerServiceUpdate">
|
|
|
|
<a class="btn btn-default btn-sm pull-right" ng-click="isUpdating || addNetwork(service)" ng-disabled="isUpdating">
|
|
|
|
<i class="fa fa-plus-circle" aria-hidden="true"></i> network
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</rd-widget-header>
|
|
|
|
<rd-widget-body ng-if="!service.Networks || service.Networks.length === 0">
|
2017-03-20 20:28:09 +00:00
|
|
|
<p>This service is not connected to any networks.</p>
|
|
|
|
</rd-widget-body>
|
2020-08-06 23:11:47 +00:00
|
|
|
<rd-widget-body ng-if="service.Networks && service.Networks.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>
|
2020-08-06 23:11:47 +00:00
|
|
|
<th>Name</th>
|
2017-03-20 20:28:09 +00:00
|
|
|
<th>ID</th>
|
|
|
|
<th>IP address</th>
|
2020-08-06 23:11:47 +00:00
|
|
|
<th>Actions</th>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-08-06 23:11:47 +00:00
|
|
|
<tr ng-repeat="network in service.Networks">
|
2017-03-20 20:28:09 +00:00
|
|
|
<td>
|
2020-08-06 23:11:47 +00:00
|
|
|
<select
|
|
|
|
ng-if="network.Editable"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="network.Id"
|
|
|
|
ng-change="updateNetwork(service)"
|
|
|
|
ng-options="net.Id as net.Name for net in filterNetworks(swarmNetworks, network)"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
style="width: initial; min-width: 50%;"
|
|
|
|
>
|
|
|
|
<option disabled value="" selected>Select a network</option>
|
|
|
|
</select>
|
|
|
|
<span ng-if="!network.Editable">{{ network.Name }}</span>
|
2017-03-20 20:28:09 +00:00
|
|
|
</td>
|
2020-08-06 23:11:47 +00:00
|
|
|
<td>
|
|
|
|
<a ui-sref="docker.networks.network({id: network.Id})">{{ network.Id }}</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ network.Addr }}
|
|
|
|
</td>
|
|
|
|
<td ng-if="network.Editable" authorization="DockerServiceUpdate">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button class="btn btn-sm btn-danger" type="button" ng-click="removeNetwork(service, $index)" ng-disabled="isUpdating">
|
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td ng-if="!network.Editable"></td>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2020-08-06 23:11:47 +00:00
|
|
|
<rd-widget-footer authorization="DockerServiceUpdate">
|
|
|
|
<div class="btn-toolbar" role="toolbar">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="isUpdating || !hasChanges(service, ['Networks'])" 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, ['Networks'])">Reset changes</a></li>
|
|
|
|
<li><a ng-click="cancelChanges(service)">Reset all changes</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</rd-widget-footer>
|
2017-03-20 20:28:09 +00:00
|
|
|
</rd-widget>
|
|
|
|
</div>
|