-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet][Cloud] Enrollment token table may show an empty last page #167663
Comments
Pinging @elastic/fleet (Team:Fleet) |
Hi @jen-huang - can you please assign this to me ? this will be my first contribution into |
Hii, I would like to start my open source contribution by solving this issue. Can anyone assign me to it? |
@pra2107tham Assigned you. Thanks and let us know if you have any questions. |
@jen-huang from what I can understand from this issue, i can think of 2 ways to solve (correct me if I'm wrong) : |
Yes, I think this is accurate. You can see the total calculation and the filtering on agent policies on these lines: Lines 124 to 130 in 41ee647
Probably |
I accidentally made 6 tokens and they r not going back, i uninstalled them but it still stays in the list? how can i reset the tokens in my local server |
…7663 (#188049) Fixes #167663 ## Summary Fixes the creation of extra empty page at pagination of 5 rows ### Video https://github.com/elastic/kibana/assets/140709379/cdac6a22-f239-4b70-b40c-93fc727418a6 Co-authored-by: Julien Lind <[email protected]>
…stic#167663 (elastic#188049) Fixes elastic#167663 ## Summary Fixes the creation of extra empty page at pagination of 5 rows ### Video https://github.com/elastic/kibana/assets/140709379/cdac6a22-f239-4b70-b40c-93fc727418a6 Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit 1f7fdfd)
…age #167663 (#188049) (#188127) # Backport This will backport the following commits from `main` to `8.15`: - [[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)](#188049) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pratham Shirbhate","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-11T09:15:54Z","message":"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\n\nFixes #167663 \r\n\r\n## Summary\r\n\r\nFixes the creation of extra empty page at pagination of 5 rows\r\n\r\n\r\n### Video \r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/140709379/cdac6a22-f239-4b70-b40c-93fc727418a6\r\n\r\nCo-authored-by: Julien Lind <[email protected]>","sha":"1f7fdfdfe428525b08bf14321463d091bdad4c79","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","💝community","Team:Fleet","backport:prev-minor","v8.15.0","v8.16.0"],"title":"[Fleet][Cloud] Enrollment token table may show an empty last page #167663","number":188049,"url":"https://github.com/elastic/kibana/pull/188049","mergeCommit":{"message":"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\n\nFixes #167663 \r\n\r\n## Summary\r\n\r\nFixes the creation of extra empty page at pagination of 5 rows\r\n\r\n\r\n### Video \r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/140709379/cdac6a22-f239-4b70-b40c-93fc727418a6\r\n\r\nCo-authored-by: Julien Lind <[email protected]>","sha":"1f7fdfdfe428525b08bf14321463d091bdad4c79"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188049","number":188049,"mergeCommit":{"message":"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\n\nFixes #167663 \r\n\r\n## Summary\r\n\r\nFixes the creation of extra empty page at pagination of 5 rows\r\n\r\n\r\n### Video \r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/140709379/cdac6a22-f239-4b70-b40c-93fc727418a6\r\n\r\nCo-authored-by: Julien Lind <[email protected]>","sha":"1f7fdfdfe428525b08bf14321463d091bdad4c79"}}]}] BACKPORT--> Co-authored-by: Pratham Shirbhate <[email protected]>
…page elastic#167663 (elastic#188049)" This reverts commit 1f7fdfd.
The previous work will be reverted in #194343 so I'm reopening this. That approach broke pagination in general so this will need to be fixed in a different way. |
…page elastic#167663 (elastic#188049)" (elastic#194343) ## Summary Resolves elastic#194339. This PR reverts elastic#188049 as it inadvertently broke pagination of the enrollment tokens page. This means that elastic#167663 will need to be re-opened and fixed in a different way. (cherry picked from commit 283f6e6)
…page elastic#167663 (elastic#188049)" (elastic#194343) ## Summary Resolves elastic#194339. This PR reverts elastic#188049 as it inadvertently broke pagination of the enrollment tokens page. This means that elastic#167663 will need to be re-opened and fixed in a different way. (cherry picked from commit 283f6e6)
…empty last page #167663 (#188049)" (#194343) (#194480) # Backport This will backport the following commits from `main` to `8.x`: - [Revert "[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)" (#194343)](#194343) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-30T19:35:13Z","message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\"","number":194343,"url":"https://github.com/elastic/kibana/pull/194343","mergeCommit":{"message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194343","number":194343,"mergeCommit":{"message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f"}}]}] BACKPORT--> Co-authored-by: Jen Huang <[email protected]>
… empty last page #167663 (#188049)" (#194343) (#194479) # Backport This will backport the following commits from `main` to `8.15`: - [Revert "[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)" (#194343)](#194343) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-30T19:35:13Z","message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\"","number":194343,"url":"https://github.com/elastic/kibana/pull/194343","mergeCommit":{"message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194343","number":194343,"mergeCommit":{"message":"Revert \"[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)\" (#194343)\n\n## Summary\r\n\r\nResolves #194339.\r\n\r\nThis PR reverts #188049 as it inadvertently broke pagination of the\r\nenrollment tokens page. This means that #167663 will need to be\r\nre-opened and fixed in a different way.","sha":"283f6e64c9656c97fa37be34f3e6fab2e8ad459f"}}]}] BACKPORT--> Co-authored-by: Jen Huang <[email protected]>
Ohh, if it broke pagination? so should I try with new method or it has been closed? |
Kibana version: v8.11 (main) cloud deployment
Describe the bug: managed policies are hidden from the Enrollment token table, but this filtering is done on frontend side, this makes the received
total
value invalid. Because of this, if there ispageSize * n
number of other enrollment tokens, thetotal
will bepageSize * n + 1
including the Cloud agent policy token, therefore the table will show an additional, empty page.Steps to reproduce:
Expected behavior: there is only one page, not two
Screenshots (if relevant):
The text was updated successfully, but these errors were encountered: