fix pagination not working in legacy modes with kubernetes apis enabled (#112478)

* dashboards: fix pagination not working in legacy modes with kubernetes apis enabled
This commit is contained in:
Will Assis
2025-10-15 16:32:25 -04:00
committed by GitHub
parent 4e84e76934
commit 3dceaac5dc
2 changed files with 96 additions and 0 deletions
+4
View File
@@ -279,8 +279,12 @@ func (s *SearchHandler) DoSearch(w http.ResponseWriter, r *http.Request) {
}
if queryParams.Has("offset") {
offset, _ = strconv.Atoi(queryParams.Get("offset"))
if offset > 0 {
page = (offset / limit) + 1
}
} else if queryParams.Has("page") {
page, _ = strconv.Atoi(queryParams.Get("page"))
offset = (page - 1) * limit
}
searchRequest := &resourcepb.ResourceSearchRequest{