Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix after parameter on topic data pagination #1468

Merged

Conversation

AlexisSouquiere
Copy link
Collaborator

When the topic data search gets enough results in less than the defined 0.5% topic data increment (merged in #1209), the after variable given by the backend response won't be used (never set in nextPage state).

Then pagination won't work because it will use an old value of the nextPage variable (the one we get after the 1st topic data request when you open the topic data screen).

Ex: I perform a search by the key and the first page is returned after looking into the first 0.46% of topic data.
image

When I try to navigate to the next page, AKHQ will display No data available. This is because the URL requested is wrong:

/ui/myCluster/topic/myTopic/data?sort=OLDEST&partition=All&searchByKey=XXX_C&after=/api/myCluster/topic/myTopic/data?after=0-50&partition=All&sort=OLDEST

instead of
/ui/myCluster/topic/myTopic/data?sort=OLDEST&partition=All&searchByKey=XXX_C&after=0-122_1-0_2-0

This fix will always add the after parameter in searchEnd and set the nextPage variable with this value
image

@tchiotludo tchiotludo merged commit 4713261 into tchiotludo:dev Apr 26, 2023
markush81 added a commit to markush81/akhq that referenced this pull request May 1, 2023
* dev: (62 commits)
  chore(docker): add unless-stopped (tchiotludo#1445)
  fix(connect): sort throw exception (tchiotludo#1431)
  chore(build): add idea-ext on build.gradle (tchiotludo#1446)
  fix(topicdata): no topic data when 1 record with newest sort  (tchiotludo#1466)
  fix(topicdata): search can failed data pagination with many results (tchiotludo#1468)
  chore(schema): typos
  chore(version): update to 0.24.0
  chore(deps): update java deps
  fix(ui): fixing logo not showing on login form (tchiotludo#1449)
  fix(ui): fixing data download inconsistencies on JSON and CSV format (tchiotludo#1442)
  chore(docs): add GrtGaz as AKHQ user (tchiotludo#1439)
  feat(ui): download all messages in a topic to a csv file (tchiotludo#1384)
  fix(ui): clicking on Empty Topic button display blank screen (tchiotludo#1429)
  chore(landing): add baloise logo (tchiotludo#1427)
  fix(ui): don't disabled empty for compact,delete topic
  chore(deps): update all java deps
  fix(topicdata): Use the partition leader from partition info (tchiotludo#1388)
  fix(ui):  harmonize utc labels (tchiotludo#1403)
  fix(ui): fix produce multi / tombstone not working and forms layout issue (tchiotludo#1396)
  fix(auth): fix regex header string for long strim (tchiotludo#1402)
  ...

# Conflicts:
#	.env
#	build.gradle
#	client/src/containers/Topic/Topic/TopicData/TopicData.jsx
#	gradle.properties
#	helm/akhq/Chart.yaml
#	src/main/java/org/akhq/controllers/SchemaController.java
#	src/test/java/org/akhq/controllers/KsqlDbControllerTest.java
#	src/test/java/org/akhq/repositories/KsqlDbRepositoryTest.java
markush81 added a commit to markush81/akhq that referenced this pull request May 1, 2023
* dev:
  chore(docker): add unless-stopped (tchiotludo#1445)
  fix(connect): sort throw exception (tchiotludo#1431)
  chore(build): add idea-ext on build.gradle (tchiotludo#1446)
  fix(topicdata): no topic data when 1 record with newest sort  (tchiotludo#1466)
  fix(topicdata): search can failed data pagination with many results (tchiotludo#1468)
  chore(schema): typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants