Skip to content

Commit 7079401

Browse files
hotfix: [UIE-9134] Increase page size for RBAC IAM entities call (#12762)
* fix: [UIE-9134] Increase page size for entities call as temporary workaround * changesets * changelog cleanup * changelog cleanup --------- Co-authored-by: Richard O'Donnell <[email protected]>
1 parent 0b6a4ab commit 7079401

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

packages/api-v4/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
### Changed:
99

1010
- Replace deprecated apis from /account/entity-transfers to /account/service-transfers ([#12658](https://github.com/linode/manager/pull/12658))
11+
- IAM RBAC Update `getAccountEntities` API call with params ([#12762](https://github.com/linode/manager/pull/12762))
1112

1213
### Removed:
1314

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import { BETA_API_ROOT } from '../constants';
2-
import Request, { setMethod, setURL } from '../request';
2+
import Request, { setMethod, setParams, setURL } from '../request';
33

44
import type { AccountEntity } from './types';
5-
import type { ResourcePage } from 'src/types';
5+
import type { Params, ResourcePage } from 'src/types';
66

77
/**
88
* getAccountEntities
99
*
1010
* Return all entities for account.
1111
*
1212
*/
13-
export const getAccountEntities = () => {
13+
export const getAccountEntities = (params?: Params) => {
1414
return Request<ResourcePage<AccountEntity>>(
1515
setURL(`${BETA_API_ROOT}/entities`),
1616
setMethod('GET'),
17+
setParams(params),
1718
);
1819
};

packages/manager/src/queries/entities/queries.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { createQueryKeys } from '@lukemorales/query-key-factory';
33

44
export const entitiesQueries = createQueryKeys('entities', {
55
entities: {
6-
queryFn: getAccountEntities,
6+
queryFn: ({ pageParam }) =>
7+
getAccountEntities({ page: pageParam as number, page_size: 500 }),
78
queryKey: null,
89
},
910
});

packages/queries/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
### Changed:
99

1010
- Replace deprecated queries from /account/entity-transfers to /account/service-transfers ([#12658](https://github.com/linode/manager/pull/12658))
11+
- IAM RBAC - Increase getAccountEntities page size to 500 ([#12762](https://github.com/linode/manager/pull/12762))
1112

1213
### Upcoming Features:
1314

0 commit comments

Comments
 (0)