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

Merging latest changes develop #25

Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6a5cc86
feat: [UIE-8194] - DBaaS major and minor upgrades - 4 (#11199)
corya-akamai Nov 6, 2024
eeae3a3
feat: [M3-8831] - New GPUv2 egress transfer display (#11209)
abailly-akamai Nov 6, 2024
e04981a
change: [M3-8806] - Disable unsupported images for distributed region…
hana-akamai Nov 6, 2024
bcdefc9
fix: [UIE-8246] - DBaaS provisioning 2 node clusters (#11218)
corya-akamai Nov 6, 2024
cee32ae
feat : [M3-8528] - Include Object Storage buckets in Support tickets'…
harsh-akamai Nov 7, 2024
661d3a3
Initial Changelog
jaalah Nov 7, 2024
0da3709
refactor: [M3-8646] – Migrate `Divider` to `ui` package (#11205)
harsh-akamai Nov 7, 2024
4d3157a
UIE-8247: Conditionally give the new docs as the link on database lan…
rodonnel-akamai Nov 7, 2024
129a9da
fix: [M3-8764] - Kubernetes UI issues (#11217)
bnussman-akamai Nov 7, 2024
ea8b449
upcoming: [DI-21811] - Post processing of missing timestamp data acro…
venkymano-akamai Nov 7, 2024
45e60bc
Update changelog
jaalah Nov 7, 2024
d4e59f1
refactor: [M3-8650] - Migrate Stack to `@linode/ui` package (#11228)
coliu-akamai Nov 7, 2024
5b05b76
refactor: [M3-8710] - Move `Notice` & `Tooltip` components to UI pack…
hkhalil-akamai Nov 7, 2024
0a2aa32
change: [M3-7337] - change Linode Details Summary VPC IPv4 Text to Co…
hasyed-akamai Nov 8, 2024
57eb19f
upcoming: [DI-21814] - ACLP UI - DBaaS instances order by label (#11226)
ankita-akamai Nov 8, 2024
e459252
UIE-8254: Add tooltip for ipv6 for new db clusters (#11231)
rodonnel-akamai Nov 8, 2024
9d9bc07
feat: [UIE-8193] - Usable Storage Tooltip for Create/Resize Database …
mpolotsk-akamai Nov 8, 2024
a95a557
Merge branch 'release-v1.132.0' of github.com:linode/manager into rel…
jaalah Nov 8, 2024
27a651c
feat: [UIE-8193] - Tooltip for Create/Resize Database table (#11223)
mpolotsk-akamai Nov 8, 2024
7b2b6af
DBaaS additions
jaalah Nov 8, 2024
49e8802
GPU egress transfer copy update (#11235)
abailly-akamai Nov 8, 2024
91b5c23
default behavior when creating new child clusters should match what e…
talmai Nov 8, 2024
f065afd
Update PULL_REQUEST_TEMPLATE.md (#11219)
jcallahan-akamai Nov 8, 2024
5fc6839
change: [M3-8860] - Update unit testing docs to prefer `userEvent` ov…
mjac0bs Nov 8, 2024
5847311
Update changelog
jaalah Nov 8, 2024
04e3620
Fix LKE create ACL tests (#11237)
jdamore-linode Nov 9, 2024
abbedaf
feat: [M3-8665] - add option to copy token in LKE details page. (#11179)
hasyed-akamai Nov 11, 2024
fe172fa
fix: sx styling for Textfield component (#11246)
coliu-akamai Nov 12, 2024
185ece4
fix: [M3-8894] - Linode Create crash when selected a Linode with a `t…
bnussman-akamai Nov 12, 2024
060af91
Merge pull request #11220 from linode/release-v1.132.0
hana-akamai Nov 12, 2024
6b4b139
Merge pull request #11249 from linode/staging
hana-akamai Nov 12, 2024
dd212ec
Merge branch 'master' into develop
hana-akamai Nov 12, 2024
3450d7c
change: [M3-8857] - Update PULL_REQUEST_TEMPLATE (Part 2) (#11236)
mjac0bs Nov 12, 2024
292ae6c
refactor: [M3-8900] - Move `RadioGroup` to `@linode/ui` package (#11254)
pmakode-akamai Nov 13, 2024
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
Prev Previous commit
Next Next commit
feat: [M3-8831] - New GPUv2 egress transfer display (linode#11209)
* Add new gpuV2 egress transferlogic

* light cleanup

* adjust e2e s

* Added changeset: New GPUv2 egress transfer helpers

* feedback @coliu-akamai @hkhalil-akamai

* feedback @coliu-akamai @jaalah-akamai

* feedback optimization
  • Loading branch information
abailly-akamai authored Nov 6, 2024
commit eeae3a3fd363a25dde71779b24f67b37b19f6e34
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11209-added-1730788980490.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

New GPUv2 egress transfer helpers ([#11209](https://github.com/linode/manager/pull/11209))
12 changes: 10 additions & 2 deletions packages/manager/cypress/e2e/core/linodes/plan-selection.spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
mockGetRegionAvailability,
} from 'support/intercepts/regions';
import { mockGetLinodeTypes } from 'support/intercepts/linodes';
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';

const mockRegions = [
regionFactory.build({
@@ -356,19 +357,26 @@ describe('displays specific linode plans for GPU', () => {
mockGetRegionAvailability(mockRegions[0].id, mockRegionAvailability).as(
'getRegionAvailability'
);
mockAppendFeatureFlags({
gpuv2: {
transferBanner: true,
planDivider: true,
egressBanner: true,
},
}).as('getFeatureFlags');
});

it('Should render divided tables when GPU divider enabled', () => {
cy.visitWithLogin('/linodes/create');

cy.wait(['@getRegions', '@getLinodeTypes', '@getFeatureFlags']);
ui.regionSelect.find().click();
ui.regionSelect.findItemByRegionLabel(mockRegions[0].label).click();

// GPU tab
// Should display two separate tables
cy.findByText('GPU').click();
cy.get(linodePlansPanel).within(() => {
cy.findAllByRole('alert').should('have.length', 2);
cy.findAllByRole('alert').should('have.length', 3);
cy.get(notices.unavailable).should('be.visible');

cy.findByRole('table', {
15 changes: 9 additions & 6 deletions packages/manager/src/components/TableCell/TableCell.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import {
default as _TableCell,
TableCellProps as _TableCellProps,
} from '@mui/material/TableCell';
import { Theme } from '@mui/material/styles';
import { default as _TableCell } from '@mui/material/TableCell';
import * as React from 'react';
import { makeStyles } from 'tss-react/mui';

import { TooltipIcon } from 'src/components/TooltipIcon';

import type { Theme } from '@mui/material/styles';
import type { TableCellProps as _TableCellProps } from '@mui/material/TableCell';

const useStyles = makeStyles()((theme: Theme) => ({
actionCell: {
textAlign: 'right',
@@ -106,7 +105,11 @@ export const TableCell = (props: TableCellProps) => {
[classes.root]: true,
[classes.sortable]: sortable,
// hide the cell at small breakpoints if it's empty with no parent column
emptyCell: !parentColumn && !props.children,
emptyCell:
(!parentColumn && !props.children) ||
(!parentColumn &&
Array.isArray(props.children) &&
!props.children[0]),
},
className
)}
1 change: 1 addition & 0 deletions packages/manager/src/featureFlags.ts
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ export interface CloudPulseResourceTypeMapFlag {
interface gpuV2 {
egressBanner: boolean;
planDivider: boolean;
transferBanner: boolean;
}

interface DesignUpdatesBannerFlag extends BaseFeatureFlag {
Original file line number Diff line number Diff line change
@@ -12,14 +12,15 @@ interface StyledTableCellPropsProps extends TableCellProps {

export const StyledTable = styled(Table, {
label: 'StyledTable',
})(({ theme }) => ({
})({
overflowX: 'hidden',
}));
});

export const StyledTableCell = styled(TableCell, {
label: 'StyledTableCell',
shouldForwardProp: omittedProps(['isPlanCell']),
})<StyledTableCellPropsProps>(({ theme, ...props }) => ({
...(props.isPlanCell && { width: '30%' }),
'&.emptyCell': {
borderRight: 'none',
},
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LinodeTypeClass } from '@linode/api-v4/lib/linodes';
import Grid from '@mui/material/Unstable_Grid2';
import * as React from 'react';
import { useLocation } from 'react-router-dom';
@@ -14,6 +13,7 @@ import { PlanSelectionTable } from './PlanSelectionTable';

import type { PlanWithAvailability } from './types';
import type { Region } from '@linode/api-v4';
import type { LinodeTypeClass } from '@linode/api-v4/lib/linodes';

export interface PlanContainerProps {
allDisabledPlans: PlanWithAvailability[];
@@ -50,7 +50,8 @@ export const PlanContainer = (props: PlanContainerProps) => {

// Show the Transfer column if, for any plan, the api returned data and we're not in the Database Create flow
const showTransfer =
showLimits && plans.some((plan: PlanWithAvailability) => plan.transfer);
showLimits &&
plans.some((plan: PlanWithAvailability) => plan.transfer !== undefined);

// Show the Network throughput column if, for any plan, the api returned data (currently Bare Metal does not)
const showNetwork =
@@ -198,6 +199,7 @@ export const PlanContainer = (props: PlanContainerProps) => {
}
key={`plan-filter-${idx}`}
planFilter={table.planFilter}
plans={plans}
showNetwork={showNetwork}
showTransfer={showTransfer}
/>
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ export const PlanInformation = (props: PlanInformationProps) => {
return Boolean(disabledClasses?.includes(thisClass));
};
const showGPUEgressBanner = Boolean(useFlags().gpuv2?.egressBanner);
const showTransferBanner = Boolean(useFlags().gpuv2?.transferBanner);

return (
<>
@@ -68,6 +69,23 @@ export const PlanInformation = (props: PlanInformationProps) => {
</Typography>
</Notice>
)}
{showTransferBanner && (
<Notice spacingBottom={8} variant="warning">
<Typography
fontFamily={(theme: Theme) => theme.font.bold}
fontSize="1rem"
>
Some plans do not include bundled network transfer. If the
transfer allotment is 0, all outbound network transfer is
subject to standard charges.
<br />
<Link to="https://techdocs.akamai.com/cloud-computing/docs/network-transfer-usage-and-costs">
Learn more about transfer costs
</Link>
.
</Typography>
</Notice>
)}
<PlansAvailabilityNotice
hasSelectedRegion={hasSelectedRegion}
isSelectedRegionEligibleForPlan={isSelectedRegionEligibleForPlan}
Original file line number Diff line number Diff line change
@@ -195,7 +195,11 @@ export const PlanSelection = (props: PlanSelectionProps) => {
</TableCell>
{showTransfer ? (
<TableCell center data-qa-transfer>
{plan.transfer ? <>{plan.transfer / 1000} TB</> : ''}
{plan.transfer !== undefined ? (
<>{plan.transfer / 1000} TB</>
) : (
''
)}
</TableCell>
) : null}
{showNetwork ? (
Original file line number Diff line number Diff line change
@@ -4,10 +4,13 @@ import { TableBody } from 'src/components/TableBody';
import { TableHead } from 'src/components/TableHead';
import { TableRow } from 'src/components/TableRow';
import { TableRowEmpty } from 'src/components/TableRowEmpty/TableRowEmpty';
import { TooltipIcon } from 'src/components/TooltipIcon';
import { useFlags } from 'src/hooks/useFlags';
import { PLAN_SELECTION_NO_REGION_SELECTED_MESSAGE } from 'src/utilities/pricing/constants';

import { StyledTable, StyledTableCell } from './PlanContainer.styles';
import { PlanWithAvailability } from './types';

import type { PlanWithAvailability } from './types';

interface PlanSelectionFilterOptionsTable {
header?: string;
@@ -17,6 +20,7 @@ interface PlanSelectionFilterOptionsTable {
interface PlanSelectionTableProps {
filterOptions?: PlanSelectionFilterOptionsTable;
planFilter?: (plan: PlanWithAvailability) => boolean;
plans?: PlanWithAvailability[];
renderPlanSelection: (
filterOptions?: PlanSelectionFilterOptionsTable | undefined
) => React.JSX.Element[];
@@ -45,11 +49,26 @@ const tableCells = [
export const PlanSelectionTable = (props: PlanSelectionTableProps) => {
const {
filterOptions,
plans,
renderPlanSelection,
shouldDisplayNoRegionSelectedMessage,
showNetwork: shouldShowNetwork,
showTransfer: shouldShowTransfer,
} = props;
const flags = useFlags();

const showTransferTooltip = React.useCallback(
(cellName: string) =>
plans?.some((plan) => {
return (
flags.gpuv2?.transferBanner &&
plan.class === 'gpu' &&
filterOptions?.header?.includes('Ada') &&
cellName === 'Transfer'
);
}),
[plans, filterOptions, flags.gpuv2]
);

return (
<StyledTable
@@ -78,6 +97,19 @@ export const PlanSelectionTable = (props: PlanSelectionTableProps) => {
{isPlanCell && filterOptions?.header
? filterOptions?.header
: cellName}
{showTransferTooltip(cellName) && (
<TooltipIcon
sxTooltipIcon={{
height: 12,
marginTop: '-2px',
ml: 0.5,
px: 0,
py: 0,
}}
status="help"
text="Some plans do not include bundled network transfer. If the transfer allotment is 0, all outbound network transfer is subject to standard charges."
/>
)}
</StyledTableCell>
);
})}
14 changes: 13 additions & 1 deletion packages/manager/src/mocks/serverHandlers.ts
Original file line number Diff line number Diff line change
@@ -392,7 +392,17 @@ const nanodeType = linodeTypeFactory.build({ id: 'g6-nanode-1' });
const standardTypes = linodeTypeFactory.buildList(7);
const dedicatedTypes = dedicatedTypeFactory.buildList(7);
const proDedicatedType = proDedicatedTypeFactory.build();

const gpuTypesAda = linodeTypeFactory.buildList(7, {
class: 'gpu',
gpus: 5,
label: 'Ada Lovelace',
transfer: 0,
});
const gpuTypesRX = linodeTypeFactory.buildList(7, {
class: 'gpu',
gpus: 1,
transfer: 5000,
});
const proxyAccountUser = accountUserFactory.build({
email: 'partner@proxy.com',
last_login: null,
@@ -586,6 +596,8 @@ export const handlers = [
nanodeType,
...standardTypes,
...dedicatedTypes,
...gpuTypesAda,
...gpuTypesRX,
proDedicatedType,
])
);