1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

feat(snapshots): separate snapshots from endpoint DB struct EE-4099 (#7614)

This commit is contained in:
matias-portainer 2022-09-22 17:05:10 -03:00 committed by GitHub
parent 4fe2a7c750
commit 6e0f83b99e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 393 additions and 136 deletions

View file

@ -103,6 +103,12 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht
paginatedEndpoints[idx].EdgeCheckinInterval = settings.EdgeAgentCheckinInterval
}
paginatedEndpoints[idx].QueryDate = time.Now().Unix()
if !query.excludeSnapshots {
err = handler.SnapshotService.FillSnapshotData(&paginatedEndpoints[idx])
if err != nil {
return httperror.InternalServerError("Unable to add snapshot data", err)
}
}
}
w.Header().Set("X-Total-Count", strconv.Itoa(filteredEndpointCount))