Skip to content

Commit

Permalink
#4696 Fix paging of large numbers of data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Feb 3, 2025
1 parent 9670c92 commit 485133d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,16 @@ public void addRows(final PageRequest pageRequest,
new TrimmedSortedList<>(pageRequest, Comparator.comparing(QueryHelpRow::getTitle));
for (final DocRef docRef : dataSourceProviderRegistry.getDataSourceDocRefs()) {
if (stringMatcher.match(docRef.getDisplayValue()).isPresent()) {
for (int i = 0; i < 1000; i++) {
final QueryHelpRow row = QueryHelpRow
.builder()
.type(QueryHelpType.DATA_SOURCE)
.id(DATA_SOURCE_ID + "." + docRef.getUuid() + "dszf")
.documentType(docRef.getType())
.iconTooltip(docRef.getType() + " - " + docRef.getDisplayValue())
.title("asdf " + i + " " + docRef.getDisplayValue())
.data(new QueryHelpDocument(docRef))
.build();

trimmedSortedList.add(row);
}
final QueryHelpRow row = QueryHelpRow
.builder()
.type(QueryHelpType.DATA_SOURCE)
.id(DATA_SOURCE_ID + "." + docRef.getUuid())
.documentType(docRef.getType())
.iconTooltip(docRef.getType() + " - " + docRef.getDisplayValue())
.title(docRef.getDisplayValue())
.data(new QueryHelpDocument(docRef))
.build();
trimmedSortedList.add(row);
}
}

Expand Down
24 changes: 24 additions & 0 deletions unreleased_changes/20250203_105435_840__4696.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* Issue **#4696** : Fix paging of large numbers of data sources.


```sh
# ********************************************************************************
# Issue title: Query Helper Next page control is greyed even when > 100 Data Sources are available
# Issue link: https://github.com/gchq/stroom/issues/4696
# ********************************************************************************

# ONLY the top line will be included as a change entry in the CHANGELOG.
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
# 'Fixed nasty bug'.
#
# Examples of acceptable entries are:
#
#
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
#
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
#
# * Fix bug with no associated GitHub issue.
```

0 comments on commit 485133d

Please sign in to comment.