mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
fix(service-details): fix an issue with invalid service restart policy (#1415)
This commit is contained in:
parent
e51246ee78
commit
13d8d38bf9
6 changed files with 20 additions and 13 deletions
|
@ -31,13 +31,13 @@ function ServiceViewModel(data, runningTasks, allTasks, nodes) {
|
|||
}
|
||||
|
||||
if (data.Spec.TaskTemplate.RestartPolicy) {
|
||||
this.RestartCondition = data.Spec.TaskTemplate.RestartPolicy.Condition;
|
||||
this.RestartDelay = data.Spec.TaskTemplate.RestartPolicy.Delay;
|
||||
this.RestartMaxAttempts = data.Spec.TaskTemplate.RestartPolicy.MaxAttempts;
|
||||
this.RestartWindow = data.Spec.TaskTemplate.RestartPolicy.Window;
|
||||
this.RestartCondition = data.Spec.TaskTemplate.RestartPolicy.Condition || 'any';
|
||||
this.RestartDelay = data.Spec.TaskTemplate.RestartPolicy.Delay || 5000000000;
|
||||
this.RestartMaxAttempts = data.Spec.TaskTemplate.RestartPolicy.MaxAttempts || 0;
|
||||
this.RestartWindow = data.Spec.TaskTemplate.RestartPolicy.Window || 0;
|
||||
} else {
|
||||
this.RestartCondition = 'none';
|
||||
this.RestartDelay = 0;
|
||||
this.RestartCondition = 'any';
|
||||
this.RestartDelay = 5000000000;
|
||||
this.RestartMaxAttempts = 0;
|
||||
this.RestartWindow = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue