-
Notifications
You must be signed in to change notification settings - Fork 391
upcoming: [UIE-9430] - Delete Database Connection Pool dialog #13236
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
Merged
hana-akamai
merged 8 commits into
linode:develop
from
hana-akamai:UIE-9430-delete-database-connection-pool
Jan 6, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6280f12
wip delete database connection pool dialog
hana-akamai 6eebdde
Added changeset: Delete Database Connection Pool dialog
hana-akamai 084d5b3
update delete label
hana-akamai 4c9e2dd
Merge branch 'develop' into UIE-9430-delete-database-connection-pool
hana-akamai 7efafb7
clean up and fix delete
hana-akamai d334491
address feedback
hana-akamai dbc90fc
update mock data label
hana-akamai f4e52e7
copy updates
hana-akamai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-13236-upcoming-features-1767383949809.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Upcoming Features | ||
| --- | ||
|
|
||
| Delete Database Connection Pool dialog ([#13236](https://github.com/linode/manager/pull/13236)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...atures/Databases/DatabaseDetail/DatabaseNetworking/DatabaseConnectionPoolDeleteDialog.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import { useDeleteDatabaseConnectionPoolMutation } from '@linode/queries'; | ||
| import { ActionsPanel, Notice } from '@linode/ui'; | ||
| import { useSnackbar } from 'notistack'; | ||
| import * as React from 'react'; | ||
|
|
||
| import { ConfirmationDialog } from 'src/components/ConfirmationDialog/ConfirmationDialog'; | ||
|
|
||
| interface Props { | ||
| databaseId: number; | ||
| onClose: () => void; | ||
| open: boolean; | ||
| poolLabel: string; | ||
| } | ||
|
|
||
| export const DatabaseConnectionPoolDeleteDialog = (props: Props) => { | ||
| const { onClose, open, databaseId, poolLabel } = props; | ||
| const { enqueueSnackbar } = useSnackbar(); | ||
| const { | ||
| error, | ||
| isPending, | ||
| reset, | ||
| mutateAsync: deleteConnectionPool, | ||
| } = useDeleteDatabaseConnectionPoolMutation(databaseId, poolLabel); | ||
|
|
||
| const onDelete = () => { | ||
| deleteConnectionPool().then(() => { | ||
| enqueueSnackbar(`Connection Pool ${poolLabel} deleted successfully.`, { | ||
| variant: 'success', | ||
| }); | ||
| onClose(); | ||
| }); | ||
| }; | ||
|
|
||
| const clearErrorAndClose = () => { | ||
| reset(); | ||
| onClose(); | ||
| }; | ||
|
|
||
| const actions = ( | ||
| <ActionsPanel | ||
| primaryButtonProps={{ | ||
| label: 'Delete Connection Pool', | ||
| loading: isPending, | ||
| onClick: onDelete, | ||
| }} | ||
| secondaryButtonProps={{ label: 'Cancel', onClick: clearErrorAndClose }} | ||
| style={{ padding: 0 }} | ||
| /> | ||
| ); | ||
|
|
||
| return ( | ||
| <ConfirmationDialog | ||
| actions={actions} | ||
| error={error} | ||
| onClose={() => clearErrorAndClose()} | ||
| open={open} | ||
| title={`Delete Connection Pool ${poolLabel}?`} | ||
| > | ||
| <Notice variant="warning"> | ||
| <strong>Warning:</strong> Deletion will break the service URI for any | ||
| clients using this pool. | ||
| </Notice> | ||
| </ConfirmationDialog> | ||
| ); | ||
| }; | ||
63 changes: 63 additions & 0 deletions
63
...er/src/features/Databases/DatabaseDetail/DatabaseNetworking/DatabaseConnectionPoolRow.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import { Hidden } from '@linode/ui'; | ||
| import { TableCell, TableRow } from 'akamai-cds-react-components/Table'; | ||
| import * as React from 'react'; | ||
|
|
||
| import { ActionMenu } from 'src/components/ActionMenu/ActionMenu'; | ||
| import { CONNECTION_POOL_LABEL_CELL_STYLES } from 'src/features/Databases/constants'; | ||
| import { StyledActionMenuWrapper } from 'src/features/Databases/shared.styles'; | ||
|
|
||
| import type { ConnectionPool } from '@linode/api-v4'; | ||
| import type { Action } from 'src/components/ActionMenu/ActionMenu'; | ||
|
|
||
| interface Props { | ||
| /** | ||
| * Function called when the delete button in the Action Menu is pressed. | ||
| */ | ||
| onDelete: (pool: ConnectionPool) => void; | ||
| /** | ||
| * Payment method type and data. | ||
| */ | ||
| pool: ConnectionPool; | ||
| } | ||
|
|
||
| export const DatabaseConnectionPoolRow = (props: Props) => { | ||
| const { pool, onDelete } = props; | ||
|
|
||
| const connectionPoolActions: Action[] = [ | ||
| { | ||
| onClick: () => null, | ||
| title: 'Edit', // TODO: UIE-9395 Implement edit functionality | ||
|
Check warning on line 29 in packages/manager/src/features/Databases/DatabaseDetail/DatabaseNetworking/DatabaseConnectionPoolRow.tsx
|
||
| }, | ||
| { | ||
| onClick: () => onDelete(pool), | ||
| title: 'Delete', | ||
| }, | ||
| ]; | ||
|
|
||
| return ( | ||
| <TableRow hoverable zebra> | ||
| <TableCell style={CONNECTION_POOL_LABEL_CELL_STYLES}> | ||
| {pool.label} | ||
| </TableCell> | ||
| <Hidden smDown> | ||
| <TableCell> | ||
| {`${pool.mode.charAt(0).toUpperCase()}${pool.mode.slice(1)}`} | ||
| </TableCell> | ||
| </Hidden> | ||
| <Hidden smDown> | ||
| <TableCell>{pool.size}</TableCell> | ||
| </Hidden> | ||
| <Hidden smDown> | ||
| <TableCell> | ||
| {pool.username === null ? 'Reuse inbound user' : pool.username} | ||
| </TableCell> | ||
| </Hidden> | ||
| <StyledActionMenuWrapper> | ||
| <ActionMenu | ||
| actionsList={connectionPoolActions} | ||
| ariaLabel={`Action menu for connection pool ${pool.label}`} | ||
| /> | ||
| </StyledActionMenuWrapper> | ||
| </TableRow> | ||
| ); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some additional requirements for the delete dialog shown in the wireframes that are missing.
The title doesn't follow the format shown in the wireframes from tech writing. It should be:
{action} the {label} {object}?So in this case, it would be
Delete the {poolLabel} connection pool?In the wireframes, they have a warning notification banner that explains the impact of deleting a connection pool. That should also be added.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the discussion with tech writing on the dialog title format in the wireframes, there are likely other dialogs in DBaaS that will need to be updated, such as database delete. We should make make a follow up ticket to address the title format for those other dialogs for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment in the figma, I added
theto this dialog for now but I think the title reads cleaner without thetheThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further discussion, the title format will be discussed with tech writing.