2020-04-10 21:54:53 +00:00
|
|
|
<form ng-if="applicationState.endpoint.apiVersion >= 1.3" id="service-configs" ng-submit="updateService(service)">
|
2017-11-06 08:47:31 +00:00
|
|
|
<rd-widget>
|
2022-07-19 03:29:50 +00:00
|
|
|
<rd-widget-header icon="list" feather-icon="true" title-text="Configs"> </rd-widget-header>
|
2017-11-06 08:47:31 +00:00
|
|
|
<rd-widget-body classes="no-padding">
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="form-inline" style="padding: 10px" authorization="DockerServiceUpdate">
|
2017-11-06 08:47:31 +00:00
|
|
|
Add a config:
|
2018-10-28 02:39:09 +00:00
|
|
|
<select class="form-control" ng-options="config.Name for config in configs | orderBy: 'Name'" ng-model="newConfig">
|
2017-11-06 08:47:31 +00:00
|
|
|
<option selected disabled hidden value="">Select a config</option>
|
|
|
|
</select>
|
2020-04-10 21:54:53 +00:00
|
|
|
<a class="btn btn-default btn-sm" ng-click="addConfig(service, newConfig)"> <i class="fa fa-plus-circle" aria-hidden="true"></i> add config </a>
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
2022-01-17 05:53:32 +00:00
|
|
|
<table class="table" style="margin-top: 5px">
|
2017-11-06 08:47:31 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Path in container</th>
|
|
|
|
<th>UID</th>
|
|
|
|
<th>GID</th>
|
|
|
|
<th>Mode</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="config in service.ServiceConfigs">
|
2020-04-10 21:54:53 +00:00
|
|
|
<td
|
|
|
|
><a ui-sref="docker.configs.config({id: config.Id})">{{ config.Name }}</a></td
|
|
|
|
>
|
2017-11-06 08:47:31 +00:00
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
class="form-control"
|
|
|
|
ng-model="config.FileName"
|
|
|
|
ng-change="updateConfig(service)"
|
|
|
|
placeholder="e.g. /path/in/container"
|
|
|
|
required
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2017-11-06 08:47:31 +00:00
|
|
|
</td>
|
|
|
|
<td>{{ config.Uid }}</td>
|
|
|
|
<td>{{ config.Gid }}</td>
|
|
|
|
<td>{{ config.Mode }}</td>
|
2019-05-24 06:04:58 +00:00
|
|
|
<td authorization="DockerServiceUpdate">
|
2022-07-26 23:18:06 +00:00
|
|
|
<button class="btn btn-xs btn-light pull-right" type="button" ng-click="removeConfig(service, $index)" ng-disabled="isUpdating">
|
|
|
|
<pr-icon icon="'trash'" feather="true" class-name="'icon-secondary icon-md'"></pr-icon> Remove config
|
2017-11-06 08:47:31 +00:00
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="service.ServiceConfigs.length === 0">
|
|
|
|
<td colspan="6" class="text-center text-muted">No configs associated to this service.</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2019-05-24 06:04:58 +00:00
|
|
|
<rd-widget-footer authorization="DockerServiceUpdate">
|
2017-11-06 08:47:31 +00:00
|
|
|
<div class="btn-toolbar" role="toolbar">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="!hasChanges(service, ['ServiceConfigs'])">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, ['ServiceConfigs'])">Reset changes</a></li>
|
|
|
|
<li><a ng-click="cancelChanges(service)">Reset all changes</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</rd-widget-footer>
|
|
|
|
</rd-widget>
|
|
|
|
</form>
|