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

Bug: route pagination error when delete the route item in the last page #2129

Closed
liuxiran opened this issue Sep 8, 2021 · 2 comments · Fixed by #2370
Closed

Bug: route pagination error when delete the route item in the last page #2129

liuxiran opened this issue Sep 8, 2021 · 2 comments · Fixed by #2370
Assignees
Labels
bug Something isn't working

Comments

@liuxiran
Copy link
Contributor

liuxiran commented Sep 8, 2021

Issue description

page error

when delete last item in the route list , there will no data rendered in the route list, we should update the page query item

Expected behavior

image

How to Reproduce

  1. there are 11 routes, and page size is 10
  2. turn to the second page, delete the last route

Screenshots

No response

Environment

  • apisix version (cmd: apisix version): null
  • OS (cmd: uname -a): macOS
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): null
  • etcd version, if have (cmd: run etcd --version): null
  • apisix-dashboard version, if have: 2.8
  • Browser version, if have: chrome

Additional context

No response

@liuxiran liuxiran added the bug Something isn't working label Sep 8, 2021
@freecodelover
Copy link

I can reproduce it too.
And I see it's requesting such a URL /apisix/admin/routes?label=&page=2&page_size=10 after deleting the last router.

But the page number is changed to 1 not the previous 2, so it is confusing.
image

I think it's better to use the page value in the URL.

@oil-oil
Copy link
Contributor

oil-oil commented Mar 9, 2022

Please assign this task to me and I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants