2017-06-20 10:54:27 +00:00
|
|
|
<div id="service-resources">
|
2017-03-20 20:28:09 +00:00
|
|
|
<rd-widget>
|
2022-11-28 02:00:28 +00:00
|
|
|
<rd-widget-header icon="list" title-text="Resource limits and reservations"> </rd-widget-header>
|
2017-03-20 20:28:09 +00:00
|
|
|
<rd-widget-body classes="no-padding">
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle"> Memory reservation (MB) </td>
|
2017-09-20 06:32:19 +00:00
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
class="input-sm"
|
|
|
|
type="number"
|
|
|
|
step="0.125"
|
|
|
|
min="0"
|
|
|
|
ng-model="service.ReservationMemoryBytes"
|
|
|
|
ng-change="updateServiceAttribute(service, 'ReservationMemoryBytes')"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<p class="small text-muted"> Minimum memory available on a node to run a task (set to 0 for unlimited) </p>
|
2017-03-20 20:28:09 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle"> Memory limit (MB) </td>
|
2017-09-20 06:32:19 +00:00
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input
|
|
|
|
class="input-sm"
|
|
|
|
type="number"
|
|
|
|
step="0.125"
|
|
|
|
min="0"
|
|
|
|
ng-model="service.LimitMemoryBytes"
|
|
|
|
ng-change="updateServiceAttribute(service, 'LimitMemoryBytes')"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
/>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<p class="small text-muted"> Maximum memory usage per task (set to 0 for unlimited) </p>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<div> CPU reservation </div>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<slider
|
|
|
|
model="service.ReservationNanoCPUs"
|
|
|
|
floor="0"
|
|
|
|
ceil="state.sliderMaxCpu"
|
|
|
|
step="0.25"
|
|
|
|
precision="2"
|
|
|
|
ng-if="service && state.sliderMaxCpu"
|
|
|
|
on-change="updateServiceAttribute(service, 'ReservationNanoCPUs')"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
></slider>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<p class="small text-muted"> Minimum CPU available on a node to run a task </p>
|
2017-03-20 20:28:09 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<div> CPU limit </div>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<slider
|
|
|
|
model="service.LimitNanoCPUs"
|
|
|
|
floor="0"
|
|
|
|
ceil="state.sliderMaxCpu"
|
|
|
|
step="0.25"
|
|
|
|
precision="2"
|
|
|
|
ng-if="service && state.sliderMaxCpu"
|
|
|
|
on-change="updateServiceAttribute(service, 'LimitNanoCPUs')"
|
|
|
|
disable-authorization="DockerServiceUpdate"
|
|
|
|
></slider>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td style="vertical-align: middle">
|
|
|
|
<p class="small text-muted"> Maximum CPU usage per task </p>
|
2017-09-20 06:32:19 +00:00
|
|
|
</td>
|
2017-03-20 20:28:09 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2019-05-24 06:04:58 +00:00
|
|
|
<rd-widget-footer authorization="DockerServiceUpdate">
|
2017-09-20 06:32:19 +00:00
|
|
|
<div class="btn-toolbar" role="toolbar">
|
|
|
|
<div class="btn-group" role="group">
|
2020-04-10 21:54:53 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-primary btn-sm"
|
|
|
|
ng-disabled="!hasChanges(service, ['LimitNanoCPUs', 'LimitMemoryBytes', 'ReservationNanoCPUs', 'ReservationMemoryBytes'])"
|
|
|
|
ng-click="updateService(service)"
|
|
|
|
>Apply changes</button
|
|
|
|
>
|
2017-09-20 06:32:19 +00:00
|
|
|
<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, ['LimitNanoCPUs', 'LimitMemoryBytes', 'ReservationNanoCPUs', 'ReservationMemoryBytes'])">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>
|