Skip to content

Commit f08cf11

Browse files
authored
fix: [UIE-10244] - Connection Pools table page size (linode#13448)
Remove Infinity option from the Database Connection Pools table page size dropdown
1 parent 71f5bbb commit f08cf11

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Database Connection Pools table page size ([#13448](https://github.com/linode/manager/pull/13448))

packages/manager/src/features/Databases/DatabaseDetail/DatabaseNetworking/DatabaseConnectionPools.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ import {
2121
import React from 'react';
2222

2323
import { Link } from 'src/components/Link';
24-
import {
25-
MIN_PAGE_SIZE,
26-
PAGE_SIZES,
27-
} from 'src/components/PaginationFooter/PaginationFooter.constants';
24+
import { MIN_PAGE_SIZE } from 'src/components/PaginationFooter/PaginationFooter.constants';
25+
import { DEFAULT_PAGE_SIZES } from 'src/features/Databases/constants';
2826
import {
2927
CONNECTION_POOL_LABEL_CELL_STYLES,
3028
MANAGE_CONNECTION_POOLS_LEARN_MORE_LINK,
@@ -227,7 +225,7 @@ export const DatabaseConnectionPools = ({ database }: Props) => {
227225
) => pagination.handlePageSizeChange(Number(e.detail.pageSize))}
228226
page={pagination.page}
229227
pageSize={pagination.pageSize}
230-
pageSizes={PAGE_SIZES}
228+
pageSizes={DEFAULT_PAGE_SIZES}
231229
style={{
232230
borderLeft: `1px solid ${theme.tokens.alias.Border.Normal}`,
233231
borderRight: `1px solid ${theme.tokens.alias.Border.Normal}`,

packages/manager/src/features/Databases/DatabaseLanding/DatabaseLandingTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import {
1010
} from 'akamai-cds-react-components/Table';
1111
import React from 'react';
1212

13+
import { MIN_PAGE_SIZE } from 'src/components/PaginationFooter/PaginationFooter.constants';
1314
import { TableRowEmpty } from 'src/components/TableRowEmpty/TableRowEmpty';
15+
import { DEFAULT_PAGE_SIZES } from 'src/features/Databases/constants';
1416
import { DatabaseSettingsDeleteClusterDialog } from 'src/features/Databases/DatabaseDetail/DatabaseSettings/DatabaseSettingsDeleteClusterDialog';
1517
import DatabaseSettingsResetPasswordDialog from 'src/features/Databases/DatabaseDetail/DatabaseSettings/DatabaseSettingsResetPasswordDialog';
1618
import { ManageAccessControlDrawer } from 'src/features/Databases/DatabaseDetail/ManageAccessControlDrawer';
@@ -54,8 +56,6 @@ const DatabaseLandingTable = ({
5456
preferenceKey,
5557
queryParamsPrefix: dbPlatformType,
5658
});
57-
const PAGE_SIZES = [25, 50, 75, 100];
58-
const MIN_PAGE_SIZE = 25;
5959

6060
const [selectedDatabase, setSelectedDatabase] =
6161
React.useState<DatabaseInstance>({} as DatabaseInstance);
@@ -245,7 +245,7 @@ const DatabaseLandingTable = ({
245245
) => pagination.handlePageSizeChange(Number(e.detail.pageSize))}
246246
page={pagination.page}
247247
pageSize={pagination.pageSize}
248-
pageSizes={PAGE_SIZES}
248+
pageSizes={DEFAULT_PAGE_SIZES}
249249
style={{
250250
borderLeft: `1px solid ${theme.tokens.alias.Border.Normal}`,
251251
borderRight: `1px solid ${theme.tokens.alias.Border.Normal}`,

packages/manager/src/features/Databases/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,5 @@ export const usernameOptions = [
9292
{ label: defaultUsername, value: defaultUsername },
9393
{ label: 'akmadmin', value: 'akmadmin' },
9494
]; // Currently the only options for the username field
95+
96+
export const DEFAULT_PAGE_SIZES = [25, 50, 75, 100];

0 commit comments

Comments
 (0)