2017-06-20 10:54:27 +00:00
|
|
|
<div id="service-network-specs">
|
2017-03-20 20:28:09 +00:00
|
|
|
<rd-widget>
|
2022-07-19 03:29:50 +00:00
|
|
|
<rd-widget-header icon="list" feather-icon="true" title-text="Networks">
|
2020-08-06 23:11:47 +00:00
|
|
|
<div class="nopadding" authorization="DockerServiceUpdate">
|
|
|
|
<a class="btn btn-default btn-sm pull-right" ng-click="isUpdating || addNetwork(service)" ng-disabled="isUpdating">
|
2022-07-26 23:20:21 +00:00
|
|
|
<pr-icon icon="'plus'" mode="'alt'" feather="true"></pr-icon> network
|
2020-08-06 23:11:47 +00:00
|
|
|
</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"
|
2022-01-17 05:53:32 +00:00
|
|
|
style="width: initial; min-width: 50%"
|
2020-08-06 23:11:47 +00:00
|
|
|
>
|
|
|
|
<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">
|
2022-07-26 23:18:06 +00:00
|
|
|
<button class="btn btn-sm btn-light" type="button" ng-click="removeNetwork(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>
|
2020-08-06 23:11:47 +00:00
|
|
|
</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>
|