2017-06-20 10:54:27 +00:00
< div id = "service-restart-policy" >
2017-03-20 20:28:09 +00:00
< rd-widget >
2020-04-10 21:54:53 +00:00
< rd-widget-header icon = "fa-list-alt" title-text = "Restart policy" > < / rd-widget-header >
2017-03-20 20:28:09 +00:00
< rd-widget-body classes = "no-padding" >
< table class = "table" >
< tbody >
< tr >
< td > Restart condition< / td >
< td >
< div class = "input-group input-group-sm" >
2020-04-10 21:54:53 +00:00
< select
class="selectpicker form-control"
ng-model="service.RestartCondition"
ng-change="updateServiceAttribute(service, 'RestartCondition')"
disable-authorization="DockerServiceUpdate"
>
2017-03-20 20:28:09 +00:00
< option value = "none" > None< / option >
< option value = "on-failure" > On failure< / option >
< option value = "any" > Any< / option >
< / select >
< / div >
< / td >
< td >
2022-01-17 05:53:32 +00:00
< p class = "small text-muted" style = "margin-top: 10px" > Condition for restart. < / p >
2017-03-20 20:28:09 +00:00
< / td >
< / tr >
< tr >
< td > Restart delay< / td >
< td >
2020-04-10 21:54:53 +00:00
< input
class="input-sm"
type="text"
ng-model="service.RestartDelay"
ng-change="updateServiceAttribute(service, 'RestartDelay')"
ng-pattern="/^([0-9]+)(h|m|s|ms|us|ns)$/i"
disable-authorization="DockerServiceUpdate"
/>
2017-03-20 20:28:09 +00:00
< / td >
< td >
2022-01-17 05:53:32 +00:00
< p class = "small text-muted" style = "margin-top: 10px" >
2017-12-07 20:05:45 +00:00
Delay between restart attempts expressed by a number followed by unit (ns|us|ms|s|m|h). Default value is 5s, 5 seconds.
2017-03-20 20:28:09 +00:00
< / p >
< / td >
< / tr >
< tr >
< td > Restart max attempts< / td >
< td >
2020-04-10 21:54:53 +00:00
< input
class="input-sm"
type="number"
ng-model="service.RestartMaxAttempts"
ng-change="updateServiceAttribute(service, 'RestartMaxAttempts')"
disable-authorization="DockerServiceUpdate"
/>
2017-03-20 20:28:09 +00:00
< / td >
< td >
2022-01-17 05:53:32 +00:00
< p class = "small text-muted" style = "margin-top: 10px" > Maximum attempts to restart a given task before giving up (default value is 0, which means unlimited). < / p >
2017-03-20 20:28:09 +00:00
< / td >
< / tr >
< tr >
< td > Restart window< / td >
< td >
2020-04-10 21:54:53 +00:00
< input
class="input-sm"
type="text"
ng-model="service.RestartWindow"
ng-change="updateServiceAttribute(service, 'RestartWindow')"
ng-pattern="/^([0-9]+)(h|m|s|ms|us|ns)$/i"
disable-authorization="DockerServiceUpdate"
/>
2017-03-20 20:28:09 +00:00
< / td >
< td >
2022-01-17 05:53:32 +00:00
< p class = "small text-muted" style = "margin-top: 10px" >
2017-12-07 20:05:45 +00:00
Time window to evaluate restart attempts expressed by a number followed by unit (ns|us|ms|s|m|h). Default value is 0 seconds, which is unbounded.
2017-03-20 20:28:09 +00:00
< / p >
< / 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" >
2020-04-10 21:54:53 +00:00
< button
type="button"
class="btn btn-primary btn-sm"
ng-disabled="!hasChanges(service, ['RestartCondition', 'RestartDelay', 'RestartMaxAttempts', 'RestartWindow'])"
ng-click="updateService(service)"
>Apply changes< /button
>
2017-03-20 20:28:09 +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, ['RestartCondition', 'RestartDelay', 'RestartMaxAttempts', 'RestartWindow'])" > Reset changes< / a > < / li >
< li > < a ng-click = "cancelChanges(service)" > Reset all changes< / a > < / li >
< / ul >
< / div >
< / div >
< / rd-widget-footer >
< / rd-widget >
< / div >