Skip to content

Commit

Permalink
[8.15] [Fleet][Cloud] Enrollment token table may show an empty last p…
Browse files Browse the repository at this point in the history
…age elastic#167663 (elastic#188049) (elastic#188127)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Fleet][Cloud] Enrollment token table may show an empty last page
elastic#167663 (elastic#188049)](elastic#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 elastic#167663
(elastic#188049)\n\nFixes elastic#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
elastic#167663","number":188049,"url":"https://github.com/elastic/kibana/pull/188049","mergeCommit":{"message":"[Fleet][Cloud]
Enrollment token table may show an empty last page elastic#167663
(elastic#188049)\n\nFixes elastic#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 elastic#167663
(elastic#188049)\n\nFixes elastic#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]>
  • Loading branch information
kibanamachine and pra2107tham authored Jul 11, 2024
1 parent d9bc76a commit 4806820
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => {
const agentPolicy = agentPoliciesById[enrollmentKey.policy_id];
return !agentPolicy?.is_managed;
}) || [];
const filteredTotal = rowItems.length;

const columns = [
{
Expand Down Expand Up @@ -294,7 +295,7 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => {
pagination={{
pageIndex: pagination.currentPage - 1,
pageSize: pagination.pageSize,
totalItemCount: total,
totalItemCount: filteredTotal,
pageSizeOptions,
}}
onChange={({ page }: { page: { index: number; size: number } }) => {
Expand Down

0 comments on commit 4806820

Please sign in to comment.