Skip to content

Commit af363a5

Browse files
authored
feat: [M3-8931] - Add doc link and region availability banner for Accelerated plans (linode#11363)
* update link + add region availability banner * Added changeset: Docs link and region availability notice for Accelerated compute plans * update plan-selection tests due (new banner added)
1 parent 50a5f6e commit af363a5

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Added
3+
---
4+
5+
Docs link and region availability notice for Accelerated compute plans ([#11363](https://github.com/linode/manager/pull/11363))

packages/manager/cypress/e2e/core/linodes/plan-selection.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ describe('Linode Accelerated plans', () => {
488488

489489
cy.findByText('Accelerated').click();
490490
cy.get(linodePlansPanel).within(() => {
491-
cy.findAllByRole('alert').should('have.length', 1);
491+
cy.findAllByRole('alert').should('have.length', 2);
492492

493493
cy.findByRole('table', {
494494
name: 'List of Linode Plans',
@@ -543,7 +543,7 @@ describe('Linode Accelerated plans', () => {
543543

544544
cy.findByText('Accelerated').click();
545545
cy.get(k8PlansPanel).within(() => {
546-
cy.findAllByRole('alert').should('have.length', 1);
546+
cy.findAllByRole('alert').should('have.length', 2);
547547

548548
cy.findByRole('table', { name: planSelectionTable }).within(() => {
549549
cy.findAllByRole('row').should('have.length', 2);

packages/manager/src/features/components/PlansPanel/PlanInformation.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useFlags } from 'src/hooks/useFlags';
77

88
import { APLNotice } from './APLNotice';
99
import {
10+
ACCELERATED_COMPUTE_INSTANCES_LINK,
1011
DEDICATED_COMPUTE_INSTANCES_LINK,
1112
GPU_COMPUTE_INSTANCES_LINK,
1213
HIGH_MEMORY_COMPUTE_INSTANCES_LINK,
@@ -60,12 +61,7 @@ export const PlanInformation = (props: PlanInformationProps) => {
6061
hasMajorityOfPlansDisabled;
6162

6263
const transferBanner = (
63-
<Notice
64-
spacingBottom={
65-
planType === 'accelerated' && !showLimitedAvailabilityBanner ? 24 : 8
66-
}
67-
variant="warning"
68-
>
64+
<Notice spacingBottom={8} variant="warning">
6965
<Typography
7066
fontFamily={(theme: Theme) => theme.font.bold}
7167
fontSize="1rem"
@@ -109,7 +105,17 @@ export const PlanInformation = (props: PlanInformationProps) => {
109105
/>
110106
</>
111107
) : null}
112-
{planType === 'accelerated' && transferBanner}
108+
{planType === 'accelerated' && (
109+
<>
110+
{transferBanner}
111+
<PlansAvailabilityNotice
112+
hasSelectedRegion={hasSelectedRegion}
113+
isSelectedRegionEligibleForPlan={isSelectedRegionEligibleForPlan}
114+
planType={planType}
115+
regionsData={regionsData || []}
116+
/>
117+
</>
118+
)}
113119
{planType === 'metal' ? (
114120
<MetalNotice
115121
dataTestId="metal-notice"
@@ -177,9 +183,8 @@ export const ClassDescriptionCopy = (props: ExtendedPlanType) => {
177183
docLink = GPU_COMPUTE_INSTANCES_LINK;
178184
break;
179185
case 'accelerated':
180-
// TODO: accelerated plans - acquire doc link
181186
planTypeLabel = 'Accelerated';
182-
docLink = '#';
187+
docLink = ACCELERATED_COMPUTE_INSTANCES_LINK;
183188
break;
184189
default:
185190
planTypeLabel = null;

packages/manager/src/features/components/PlansPanel/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export const GPU_COMPUTE_INSTANCES_LINK =
2727
'https://techdocs.akamai.com/cloud-computing/docs/gpu-compute-instances';
2828
export const TRANSFER_COSTS_LINK =
2929
'https://techdocs.akamai.com/cloud-computing/docs/network-transfer-usage-and-costs';
30+
// TODO: accelerated plans - update to GA link (when GA launches)
31+
export const ACCELERATED_COMPUTE_INSTANCES_LINK =
32+
'https://techdocs.akamai.com/cloud-computing/docs/accelerated-compute-instances-beta';
3033

3134
export const DEDICATED_512_GB_PLAN: ExtendedType = {
3235
accelerated_devices: 0,

0 commit comments

Comments
 (0)