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

fix(home): fix homepage edge heartbeat judgement [EE-2041] (#6624)

* fix(home): judge LastCheckInDate with QueryDate for heartbeat

* refactor(environments): remove deprecated variable homepageLoadTime

* style(environments): run yarn format

Co-authored-by: sam@gemibook <huapox@126.com>
This commit is contained in:
Oscar Zhou 2022-03-14 14:53:23 +13:00 committed by GitHub
parent f1ea2b5c02
commit 5188ead870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 15 additions and 41 deletions

View file

@ -4,6 +4,7 @@ import (
"net/http"
"strconv"
"strings"
"time"
"github.com/portainer/libhttp/request"
@ -125,6 +126,7 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht
if paginatedEndpoints[idx].EdgeCheckinInterval == 0 {
paginatedEndpoints[idx].EdgeCheckinInterval = settings.EdgeAgentCheckinInterval
}
paginatedEndpoints[idx].QueryDate = time.Now().Unix()
}
w.Header().Set("X-Total-Count", strconv.Itoa(filteredEndpointCount))