Skip to content
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

feat: [M3-8581] - GPUv2 Plan Selection Egress Banner #10956

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10956-added-1727103260742.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

GPUv2 Plan Selection Egress Banner ([#10956](https://github.com/linode/manager/pull/10956))
1 change: 1 addition & 0 deletions packages/manager/src/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface CloudPulseResourceTypeMapFlag {
}

interface gpuV2 {
egressBanner: boolean;
planDivider: boolean;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LinodeTypeClass } from '@linode/api-v4/lib/linodes';
import { Theme, useTheme } from '@mui/material/styles';
import { useTheme } from '@mui/material/styles';
import * as React from 'react';

import { Link } from 'src/components/Link';
import { Notice } from 'src/components/Notice/Notice';
import { Typography } from 'src/components/Typography';
import { StyledNoticeTypography } from 'src/features/Linodes/LinodesCreate/PlansAvailabilityNotice.styles';
import { useFlags } from 'src/hooks/useFlags';

import { PlansAvailabilityNotice } from '../../Linodes/LinodesCreate/PlansAvailabilityNotice';
import {
Expand All @@ -19,6 +19,8 @@ import { MetalNotice } from './MetalNotice';
import { planTabInfoContent } from './utils';

import type { Region } from '@linode/api-v4';
import type { LinodeTypeClass } from '@linode/api-v4/lib/linodes';
import type { Theme } from '@mui/material/styles';

export interface PlanInformationProps {
disabledClasses?: LinodeTypeClass[];
Expand All @@ -40,20 +42,38 @@ export const PlanInformation = (props: PlanInformationProps) => {
planType,
regionsData,
} = props;

const theme = useTheme();
const getDisabledClass = (thisClass: LinodeTypeClass) => {
return Boolean(disabledClasses?.includes(thisClass));
};
const showGPUEgressBanner = Boolean(useFlags().gpuv2?.egressBanner);

return (
<>
{planType === 'gpu' ? (
<PlansAvailabilityNotice
hasSelectedRegion={hasSelectedRegion}
isSelectedRegionEligibleForPlan={isSelectedRegionEligibleForPlan}
planType={planType}
regionsData={regionsData || []}
/>
<>
{showGPUEgressBanner && (
<Notice variant="info">
<Typography fontFamily={theme.font.bold} fontSize="1rem">
abailly-akamai marked this conversation as resolved.
Show resolved Hide resolved
New GPU instances are now generally available. Deploy an RTX
abailly-akamai marked this conversation as resolved.
Show resolved Hide resolved
4000 Ada GPU instance in select core compute regions in North
America, Europe, and Asia. <br />
Receive 1 TB of free included network transfer for a limited
time.{' '}
<Link to="https://www.linode.com/blog/compute/new-gpus-nvidia-rtx-4000-ada-generation">
Learn more
</Link>
.
</Typography>
</Notice>
)}
<PlansAvailabilityNotice
hasSelectedRegion={hasSelectedRegion}
isSelectedRegionEligibleForPlan={isSelectedRegionEligibleForPlan}
planType={planType}
regionsData={regionsData || []}
/>
</>
) : null}
{planType === 'metal' ? (
<MetalNotice
Expand Down
Loading