-
Notifications
You must be signed in to change notification settings - Fork 400
upcoming: [UIE-9837] - Generational plans changes for Databases #13539
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
base: develop
Are you sure you want to change the base?
Changes from all commits
57ed6e3
4b2ce56
2edb059
9e28d1a
1c26b1b
2569045
9afbc8e
9486a1e
be160d5
a0be0cf
42eaa20
f94322e
090cf86
0b897ce
67f964d
97d4308
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@linode/manager': Tests | ||
| --- | ||
|
|
||
| Mock `databaseResizeGenerationalPlans` feature flag to false for resize-database.spec.ts ([#13539](https://github.com/linode/manager/pull/13539)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Upcoming Features | ||
| --- | ||
|
|
||
| Generational plans changes for Databases ([#13539](https://github.com/linode/manager/pull/13539)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,10 @@ | |
| import { ErrorMessage } from 'src/components/ErrorMessage'; | ||
| import { LandingHeader } from 'src/components/LandingHeader'; | ||
| import { getRestrictedResourceText } from 'src/features/Account/utils'; | ||
| import { getIsLimitedAvailability } from 'src/features/components/PlansPanel/utils'; | ||
| import { | ||
| getIsLimitedAvailability, | ||
| useShouldDisablePremiumPlansTab, | ||
| } from 'src/features/components/PlansPanel/utils'; | ||
| import { DatabaseClusterData } from 'src/features/Databases/DatabaseCreate/DatabaseClusterData'; | ||
| import { | ||
| StyledBtnCtn, | ||
|
|
@@ -35,11 +38,13 @@ | |
|
|
||
| import { DatabaseCreateAccessControls } from './DatabaseCreateAccessControls'; | ||
| import { DatabaseCreateNetworkingConfiguration } from './DatabaseCreateNetworkingConfiguration'; | ||
| // import dbtypesData from './dbtypes.json'; | ||
|
Check warning on line 41 in packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx
|
||
|
|
||
| import type { AccessProps } from './DatabaseCreateAccessControls'; | ||
| import type { | ||
| ClusterSize, | ||
| CreateDatabasePayload, | ||
| // DatabaseType, | ||
| Engine, | ||
| PrivateNetwork, | ||
| VPC, | ||
|
|
@@ -74,12 +79,14 @@ | |
|
|
||
| const { | ||
| data: dbtypes, | ||
| error: typesError, | ||
| isLoading: typesLoading, | ||
| // error: typesError, | ||
| // isLoading: typesLoading, | ||
| } = useDatabaseTypesQuery({ | ||
| platform: 'rdbms-default', | ||
| }); | ||
|
|
||
| // const dbtypes = dbtypesData.data as DatabaseType[]; | ||
|
Check warning on line 88 in packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: As mentioned in the description, the |
||
|
|
||
| const flags = useFlags(); | ||
| const isVPCEnabled = flags.databaseVpc; | ||
|
|
||
|
|
@@ -252,11 +259,15 @@ | |
| } | ||
| }; | ||
|
|
||
| if (regionsLoading || !regionsData || enginesLoading || typesLoading) { | ||
| const shouldDisablePremiumPlansTab = useShouldDisablePremiumPlansTab({ | ||
| types: dbtypes, | ||
| }); | ||
|
|
||
| if (regionsLoading || !regionsData || enginesLoading) { | ||
| return <CircleProgress />; | ||
| } | ||
|
|
||
| if (regionsError || typesError || enginesError) { | ||
| if (regionsError || enginesError) { | ||
| return <ErrorState errorText="An unexpected error occurred." />; | ||
| } | ||
|
|
||
|
|
@@ -312,6 +323,9 @@ | |
| <StyledPlansPanel | ||
| data-qa-select-plan | ||
| disabled={isRestricted} | ||
| disabledTabs={ | ||
| shouldDisablePremiumPlansTab ? ['premium'] : undefined | ||
| } | ||
| error={fieldState.error?.message} | ||
| flow="database" | ||
| handleTabChange={handleTabChange} | ||
|
|
@@ -321,6 +335,11 @@ | |
| regionsData={regionsData} | ||
| selectedId={field.value} | ||
| selectedRegionID={region} | ||
| tabDisabledMessage={ | ||
| shouldDisablePremiumPlansTab | ||
| ? 'Premium CPUs are now called G7 Dedicated plans.' | ||
| : undefined | ||
| } | ||
| types={displayTypes} | ||
| /> | ||
| )} | ||
|
|
||
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.
Do we not need typesError and typesLoading?
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.
It looks like these were just removed for the mock data. Planning to add the checks these were used in back before merging the pull request. See related comment for context.