1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

fix(service-details): fix an issue with invalid service restart policy (#1415)

This commit is contained in:
Duvel 2017-11-23 10:47:39 +01:00 committed by Anthony Lapenna
parent e51246ee78
commit 13d8d38bf9
6 changed files with 20 additions and 13 deletions

View file

@ -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;
}