|
|
@ -1,15 +1,13 @@
|
|
|
|
package endpoints
|
|
|
|
package endpoints
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"sort"
|
|
|
|
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/portainer/libhttp/request"
|
|
|
|
"github.com/portainer/libhttp/request"
|
|
|
|
portainer "github.com/portainer/portainer/api"
|
|
|
|
portainer "github.com/portainer/portainer/api"
|
|
|
|
"github.com/portainer/portainer/api/http/security"
|
|
|
|
"github.com/portainer/portainer/api/http/security"
|
|
|
|
"github.com/portainer/portainer/api/internal/endpointutils"
|
|
|
|
"github.com/portainer/portainer/api/internal/endpointutils"
|
|
|
|
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"sort"
|
|
|
|
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
|
|
|
|
httperror "github.com/portainer/libhttp/error"
|
|
|
|
httperror "github.com/portainer/libhttp/error"
|
|
|
|
"github.com/portainer/libhttp/response"
|
|
|
|
"github.com/portainer/libhttp/response"
|
|
|
@ -104,7 +102,6 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht
|
|
|
|
if paginatedEndpoints[idx].EdgeCheckinInterval == 0 {
|
|
|
|
if paginatedEndpoints[idx].EdgeCheckinInterval == 0 {
|
|
|
|
paginatedEndpoints[idx].EdgeCheckinInterval = settings.EdgeAgentCheckinInterval
|
|
|
|
paginatedEndpoints[idx].EdgeCheckinInterval = settings.EdgeAgentCheckinInterval
|
|
|
|
}
|
|
|
|
}
|
|
|
|
paginatedEndpoints[idx].QueryDate = time.Now().Unix()
|
|
|
|
|
|
|
|
endpointutils.UpdateEdgeEndpointHeartbeat(&paginatedEndpoints[idx], settings)
|
|
|
|
endpointutils.UpdateEdgeEndpointHeartbeat(&paginatedEndpoints[idx], settings)
|
|
|
|
if !query.excludeSnapshots {
|
|
|
|
if !query.excludeSnapshots {
|
|
|
|
err = handler.SnapshotService.FillSnapshotData(&paginatedEndpoints[idx])
|
|
|
|
err = handler.SnapshotService.FillSnapshotData(&paginatedEndpoints[idx])
|
|
|
|