fix continuous scroll next page logic error

This commit is contained in:
Christoph Kluge
2025-06-12 17:20:22 +02:00
parent f471214ef7
commit ad108b285f
3 changed files with 9 additions and 9 deletions

View File

@@ -850,7 +850,7 @@ func (ccms *CCMetricStore) LoadNodeListData(
if len(nodes) > page.ItemsPerPage {
start := (page.Page - 1) * page.ItemsPerPage
end := start + page.ItemsPerPage
if end > len(nodes) {
if end >= len(nodes) {
end = len(nodes)
hasNextPage = false
} else {

View File

@@ -539,7 +539,7 @@ func (pdb *PrometheusDataRepository) LoadNodeListData(
if len(nodes) > page.ItemsPerPage {
start := (page.Page - 1) * page.ItemsPerPage
end := start + page.ItemsPerPage
if end > len(nodes) {
if end >= len(nodes) {
end = len(nodes)
hasNextPage = false
} else {