From d77a0887a7b24f1a7c0c1d56614e83f09c8a89a9 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Thu, 4 May 2023 21:31:57 +0700 Subject: [PATCH] docs(endpoints): deprecate EdgeCheckinInterval [EE-5281] (#8864) --- api/http/handler/endpoints/endpoint_create.go | 8 ++++++-- .../portainer/environments/environment.service/create.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/http/handler/endpoints/endpoint_create.go b/api/http/handler/endpoints/endpoint_create.go index 20c1081c0..05049c7a2 100644 --- a/api/http/handler/endpoints/endpoint_create.go +++ b/api/http/handler/endpoints/endpoint_create.go @@ -160,8 +160,12 @@ func (payload *endpointCreatePayload) Validate(r *http.Request) error { } payload.Gpus = gpus - checkinInterval, _ := request.RetrieveNumericMultiPartFormValue(r, "CheckinInterval", true) - payload.EdgeCheckinInterval = checkinInterval + edgeCheckinInterval, _ := request.RetrieveNumericMultiPartFormValue(r, "EdgeCheckinInterval", true) + if edgeCheckinInterval == 0 { + // deprecated CheckinInterval + edgeCheckinInterval, _ = request.RetrieveNumericMultiPartFormValue(r, "CheckinInterval", true) + } + payload.EdgeCheckinInterval = edgeCheckinInterval return nil } diff --git a/app/react/portainer/environments/environment.service/create.ts b/app/react/portainer/environments/environment.service/create.ts index d25de9b96..d9ff1baf3 100644 --- a/app/react/portainer/environments/environment.service/create.ts +++ b/app/react/portainer/environments/environment.service/create.ts @@ -211,7 +211,7 @@ async function createEnvironment( PublicURL: options.publicUrl, GroupID: groupId, TagIds: arrayToJson(tagIds), - CheckinInterval: options.pollFrequency, + EdgeCheckinInterval: options.pollFrequency, }; const { tls, azure } = options;