2017-06-20 10:54:27 +00:00
|
|
|
<div id="service-labels">
|
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="Service labels">
|
2019-05-24 06:04:58 +00:00
|
|
|
<div class="nopadding" authorization="DockerServiceUpdate">
|
2017-03-20 20:28:09 +00:00
|
|
|
<a class="btn btn-default btn-sm pull-right" ng-click="isUpdating || addLabel(service)" ng-disabled="isUpdating">
|
2022-07-26 23:20:21 +00:00
|
|
|
<pr-icon icon="'plus'" mode="'alt'" feather="true"></pr-icon> label
|
2017-03-20 20:28:09 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</rd-widget-header>
|
|
|
|
<rd-widget-body ng-if="service.ServiceLabels.length === 0">
|
|
|
|
<p>There are no labels for this service.</p>
|
|
|
|
</rd-widget-body>
|
|
|
|
<rd-widget-body classes="no-padding" ng-if="service.ServiceLabels.length > 0">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<th> Label </th>
|
|
|
|
<th> Value </th>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="label in service.ServiceLabels">
|
|
|
|
<td>
|
|
|
|
<div class="input-group input-group-sm">
|
|
|
|
<span class="input-group-addon fit-text-size">name</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="label.key"
|
|
|
|
placeholder="e.g. com.example.foo"
|
|
|
|
ng-change="updateLabel(service, label)"
|
|
|
|
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 fit-text-size">value</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="label.value"
|
|
|
|
placeholder="e.g. bar"
|
|
|
|
ng-change="updateLabel(service, label)"
|
|
|
|
ng-disabled="isUpdating"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2019-05-24 06:04:58 +00:00
|
|
|
<span class="input-group-btn" authorization="DockerServiceUpdate">
|
2022-07-26 23:18:06 +00:00
|
|
|
<button class="btn btn-sm btn-light" type="button" ng-click="removeLabel(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>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2019-05-24 06:04:58 +00:00
|
|
|
<rd-widget-footer authorization="DockerServiceUpdate">
|
2017-03-20 20:28:09 +00:00
|
|
|
<div class="btn-toolbar" role="toolbar">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!hasChanges(service, ['ServiceLabels'])" 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, ['ServiceLabels'])">Reset changes</a></li>
|
|
|
|
<li><a ng-click="cancelChanges(service)">Reset all changes</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</rd-widget-footer>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|