-
Notifications
You must be signed in to change notification settings - Fork 399
upcoming: [UIE-9487] VPC UI not displaying DBaaS resources #13504
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
jdamore-linode
merged 10 commits into
linode:develop
from
smans-akamai:UIE-9487-display-vpc-ui-display-dbaas-resources
Apr 9, 2026
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2e41109
fix: [UIE-9487] - Networking/DBaaS - Display DBaaS resource count andβ¦
smans-akamai 74a2739
Making enhancements to the SubnetDatabasesTable and cleaning up
smans-akamai d9b58d5
Moving paginator in SubnetDatabasesTable
smans-akamai 7068c61
Applying initial feedback
smans-akamai d53ca80
Removing leftover change from old implementation
smans-akamai 15ffa37
Adding unit tests for various changes related to dbaas resource countβ¦
smans-akamai 7d5948e
adding changesets
smans-akamai 367fdec
Applying secondary feedback
smans-akamai 06e17b4
Updating changeset and unit tests based on additional feedback
smans-akamai 1dc80e9
Applying feedback to fix text for database table IPV4 Address header
smans-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
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/api-v4": Added | ||
| --- | ||
|
|
||
| SubnetAssignedDatabaseData interface and update to Subnet to include databases property ([#13504](https://github.com/linode/manager/pull/13504)) |
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
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-13504-upcoming-features-1775679549160.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 | ||
| --- | ||
|
|
||
| DBaaS resource counts and databases resource table in VPC UI ([#13504](https://github.com/linode/manager/pull/13504)) |
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
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
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
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
132 changes: 132 additions & 0 deletions
132
packages/manager/src/features/VPCs/VPCDetail/SubnetDatabaseRow.test.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,132 @@ | ||
| import * as React from 'react'; | ||
|
|
||
| import { | ||
| databaseInstanceFactory, | ||
| subnetAssignedDatabaseDataFactory, | ||
| } from 'src/factories'; | ||
| import { renderWithTheme, wrapWithTableBody } from 'src/utilities/testHelpers'; | ||
|
|
||
| import { SubnetDatabaseRow } from './SubnetDatabaseRow'; | ||
|
|
||
| import type { DatabaseInstance } from '@linode/api-v4'; | ||
|
|
||
| const mockIpv6Range = '0000:db1::/32'; | ||
| const databaseLabel = 'test-database-1'; | ||
| const mockDatabase = databaseInstanceFactory.build({ | ||
| id: 1, | ||
| label: databaseLabel, | ||
| }); | ||
|
|
||
| const mockAssignedDatabase = subnetAssignedDatabaseDataFactory.build({ | ||
| id: 1, | ||
| ipv4_range: '1.1.1.1/32', | ||
| ipv6_ranges: [{ range: mockIpv6Range }], | ||
| }); | ||
|
|
||
| describe('SubnetDatabaseRow', () => { | ||
| beforeEach(() => { | ||
| vi.resetAllMocks(); | ||
| }); | ||
|
|
||
| it('should render SubnetDatabaseRow', () => { | ||
| const dbWithPrimary: DatabaseInstance = { | ||
| ...mockDatabase, | ||
| members: { '2.2.2.2': 'primary' }, | ||
| }; | ||
|
|
||
| const { getByText } = renderWithTheme( | ||
| wrapWithTableBody( | ||
| <SubnetDatabaseRow | ||
| assignedDatabase={mockAssignedDatabase} | ||
| database={dbWithPrimary} | ||
| /> | ||
| ) | ||
| ); | ||
| getByText(databaseLabel); | ||
| getByText(mockAssignedDatabase.ipv4_range); | ||
| getByText(mockIpv6Range); | ||
| getByText('2.2.2.2'); | ||
| }); | ||
|
|
||
| it('should render SubnetDatabaseRow with multiple failover IPs', () => { | ||
| const dbWithFailovers: DatabaseInstance = { | ||
| ...mockDatabase, | ||
| members: { | ||
| '2.2.2.2': 'primary', | ||
| '2.2.2.3': 'failover', | ||
| '2.2.2.4': 'failover', | ||
| }, | ||
| }; | ||
|
|
||
| const { getByText } = renderWithTheme( | ||
| wrapWithTableBody( | ||
| <SubnetDatabaseRow | ||
| assignedDatabase={mockAssignedDatabase} | ||
| database={dbWithFailovers} | ||
| /> | ||
| ) | ||
| ); | ||
| getByText(databaseLabel); | ||
| getByText(mockAssignedDatabase.ipv4_range); | ||
| getByText(mockIpv6Range); | ||
| getByText('2.2.2.2, 2.2.2.3, 2.2.2.4'); | ||
| }); | ||
|
|
||
| it('should render SubnetDatabaseRow with no members', () => { | ||
| const dbWithNoMembers = { | ||
| ...mockDatabase, | ||
| members: {}, | ||
| }; | ||
|
|
||
| const { getByText } = renderWithTheme( | ||
| wrapWithTableBody( | ||
| <SubnetDatabaseRow | ||
| assignedDatabase={mockAssignedDatabase} | ||
| database={dbWithNoMembers} | ||
| /> | ||
| ) | ||
| ); | ||
| getByText(databaseLabel); | ||
| getByText(mockAssignedDatabase.ipv4_range); | ||
| getByText(mockIpv6Range); | ||
| getByText('β'); | ||
| }); | ||
|
|
||
| it('should render SubnetDatabaseRow with no ipv6 ranges', () => { | ||
| const assignedDatabaseWithNoIpv6 = { | ||
| ...mockAssignedDatabase, | ||
| ipv6_ranges: null, | ||
| }; | ||
|
|
||
| const { getByText } = renderWithTheme( | ||
| wrapWithTableBody( | ||
| <SubnetDatabaseRow | ||
| assignedDatabase={assignedDatabaseWithNoIpv6} | ||
| database={mockDatabase} | ||
| /> | ||
| ) | ||
| ); | ||
| getByText(databaseLabel); | ||
| getByText(mockAssignedDatabase.ipv4_range); | ||
| getByText('β'); | ||
| }); | ||
|
|
||
| it('should render SubnetDatabaseRow with HA cluster', () => { | ||
| const haDatabase = databaseInstanceFactory.build({ | ||
| id: 1, | ||
| label: databaseLabel, | ||
| cluster_size: 3, | ||
| }); | ||
|
|
||
| const { getByText } = renderWithTheme( | ||
| wrapWithTableBody( | ||
| <SubnetDatabaseRow | ||
| assignedDatabase={mockAssignedDatabase} | ||
| database={haDatabase} | ||
| /> | ||
| ) | ||
| ); | ||
| getByText(databaseLabel); | ||
| getByText('HA'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
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.
For more info, refer to my previous comment on the databases query.