1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00

feat(edge-compute): add specific edge endpoint checkin interval (#3855)

* feat(endpoint): send custom checkin interval

* feat(endpoint): update edge checkin interval

* feat(endpoint): save checkin interval

* feat(endpoints): create endpoint with checkin interval

* feat(endpoints): change tooltip

* fix(edge-compute): fix typos

Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>

* fix(endpoints): show default interval

* fix(endpoint): rename checkin property

Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>
This commit is contained in:
Chaim Lev-Ari 2020-06-04 08:35:09 +03:00 committed by GitHub
parent 766ced7cb1
commit 9f4631bb6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 183 additions and 39 deletions

View file

@ -23,6 +23,7 @@ type endpointUpdatePayload struct {
TagIDs []portainer.TagID
UserAccessPolicies portainer.UserAccessPolicies
TeamAccessPolicies portainer.TeamAccessPolicies
EdgeCheckinInterval *int
}
func (payload *endpointUpdatePayload) Validate(r *http.Request) error {
@ -61,6 +62,10 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) *
endpoint.PublicURL = *payload.PublicURL
}
if payload.EdgeCheckinInterval != nil {
endpoint.EdgeCheckinInterval = *payload.EdgeCheckinInterval
}
groupIDChanged := false
if payload.GroupID != nil {
groupID := portainer.EndpointGroupID(*payload.GroupID)