From 531fa0e720e9b0612c313a1fdb53e98751138f04 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Tue, 9 Jan 2024 17:34:41 -0500 Subject: [PATCH 1/8] Organize constants.ts file better and add VPC docs link; use VPC docs link in multiple files --- .../src/features/VPCs/VPCCreate/VPCCreate.tsx | 3 +- .../src/features/VPCs/VPCDetail/VPCDetail.tsx | 8 +++-- .../features/VPCs/VPCLanding/VPCLanding.tsx | 12 ++++--- .../manager/src/features/VPCs/constants.ts | 35 +++++++++++-------- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx b/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx index d17ed6cf085..a317d0c7aab 100644 --- a/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx +++ b/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx @@ -8,6 +8,7 @@ import { LandingHeader } from 'src/components/LandingHeader'; import { Notice } from 'src/components/Notice/Notice'; import { Paper } from 'src/components/Paper'; import { SubnetContent } from 'src/features/VPCs/VPCCreate/FormComponents/SubnetContent'; +import { VPC_DOCS_LINK } from 'src/features/VPCs/constants'; import { useCreateVPC } from 'src/hooks/useCreateVPC'; import { CannotCreateVPCNotice } from './FormComponents/CannotCreateVPCNotice'; @@ -42,7 +43,7 @@ const VPCCreate = () => { pathname: `/vpcs/create`, }} docsLabel="Getting Started" - docsLink="#" // @TODO VPC: add correct docs link + docsLink={VPC_DOCS_LINK} title="Create" /> {userCannotAddVPC && CannotCreateVPCNotice} diff --git a/packages/manager/src/features/VPCs/VPCDetail/VPCDetail.tsx b/packages/manager/src/features/VPCs/VPCDetail/VPCDetail.tsx index 2eca4c733a1..12b46d41625 100644 --- a/packages/manager/src/features/VPCs/VPCDetail/VPCDetail.tsx +++ b/packages/manager/src/features/VPCs/VPCDetail/VPCDetail.tsx @@ -11,7 +11,11 @@ import { DocumentTitleSegment } from 'src/components/DocumentTitle'; import { EntityHeader } from 'src/components/EntityHeader/EntityHeader'; import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { LandingHeader } from 'src/components/LandingHeader'; -import { VPC_FEEDBACK_FORM_URL, VPC_LABEL } from 'src/features/VPCs/constants'; +import { + VPC_DOCS_LINK, + VPC_FEEDBACK_FORM_URL, + VPC_LABEL, +} from 'src/features/VPCs/constants'; import { useRegionsQuery } from 'src/queries/regions'; import { useVPCQuery } from 'src/queries/vpcs'; import { truncate } from 'src/utilities/truncate'; @@ -110,7 +114,7 @@ const VPCDetail = () => { }} betaFeedbackLink={VPC_FEEDBACK_FORM_URL} docsLabel="Docs" - docsLink="#" // @TODO VPC: Add docs link + docsLink={VPC_DOCS_LINK} /> diff --git a/packages/manager/src/features/VPCs/VPCLanding/VPCLanding.tsx b/packages/manager/src/features/VPCs/VPCLanding/VPCLanding.tsx index 8953649cc56..f32fef1af9c 100644 --- a/packages/manager/src/features/VPCs/VPCLanding/VPCLanding.tsx +++ b/packages/manager/src/features/VPCs/VPCLanding/VPCLanding.tsx @@ -13,14 +13,16 @@ import { TableCell } from 'src/components/TableCell'; import { TableHead } from 'src/components/TableHead'; import { TableRow } from 'src/components/TableRow'; import { TableSortCell } from 'src/components/TableSortCell'; -import { VPC_LABEL } from 'src/features/VPCs/constants'; +import { + VPC_DOCS_LINK, + VPC_FEEDBACK_FORM_URL, + VPC_LABEL, +} from 'src/features/VPCs/constants'; import { useOrder } from 'src/hooks/useOrder'; import { usePagination } from 'src/hooks/usePagination'; import { useVPCsQuery } from 'src/queries/vpcs'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; -import { VPC_FEEDBACK_FORM_URL } from 'src/features/VPCs/constants'; - import { VPCDeleteDialog } from './VPCDeleteDialog'; import { VPCEditDrawer } from './VPCEditDrawer'; import { VPCEmptyState } from './VPCEmptyState'; @@ -94,11 +96,11 @@ const VPCLanding = () => { return ( <> diff --git a/packages/manager/src/features/VPCs/constants.ts b/packages/manager/src/features/VPCs/constants.ts index 1fa6c7b9e6f..78249912bcb 100644 --- a/packages/manager/src/features/VPCs/constants.ts +++ b/packages/manager/src/features/VPCs/constants.ts @@ -1,5 +1,16 @@ // Various constants for the VPCs package +// Labels +export const VPC_LABEL = 'Virtual Private Cloud (VPC)'; + +// Keys +export const UNRECOMMENDED_CONFIGURATION_PREFERENCE_KEY = + 'not-recommended-configuration'; + +export const WARNING_ICON_UNRECOMMENDED_CONFIG = + 'warning-icon-for-unrecommended-config'; + +// Copy export const ASSIGN_LINODES_DRAWER_REBOOT_MESSAGE = 'Assigning a Linode to a subnet requires you to reboot the Linode to update its configuration.'; @@ -13,8 +24,6 @@ export const REBOOT_LINODE_WARNING_VPCDETAILS = export const SUBNET_UNASSIGN_LINODES_WARNING = `Unassigning Linodes from a subnet requires you to reboot the Linodes to update its configuration.`; -export const VPC_LABEL = 'Virtual Private Cloud (VPC)'; - export const VPC_AUTO_ASSIGN_IPV4_TOOLTIP = 'Automatically assign an IPv4 address as the private IP address for this Linode in the VPC.'; @@ -26,21 +35,9 @@ export const VPC_CREATE_FORM_SUBNET_HELPER_TEXT = export const VPC_CREATE_FORM_VPC_HELPER_TEXT = 'A VPC is an isolated network that enables private communication between Compute Instances within the same data center.'; -export const VPC_FEEDBACK_FORM_URL = - 'https://docs.google.com/forms/d/e/1FAIpQLScvWbTupCNsBF5cz5YEsv5oErHM4ONBZodDYi8KuOgC8fyfag/viewform'; - export const VPC_REBOOT_MESSAGE = 'The VPC configuration has been updated. Reboot the Linode to reflect configuration changes.'; -export const NETWORK_INTERFACES_GUIDE_URL = - 'https://www.linode.com/docs/products/compute/compute-instances/guides/configuration-profiles/'; - -export const UNRECOMMENDED_CONFIGURATION_PREFERENCE_KEY = - 'not-recommended-configuration'; - -export const WARNING_ICON_UNRECOMMENDED_CONFIG = - 'warning-icon-for-unrecommended-config'; - // Linode Config dialog helper text for unrecommended configurations export const LINODE_UNREACHABLE_HELPER_TEXT = 'This network configuration is not recommended. The Linode will not be reachable or able to reach Linodes in the other subnets of the VPC. We recommend selecting VPC as the primary interface and checking the “Assign a public IPv4 address for this Linode” checkbox.'; @@ -50,3 +47,13 @@ export const NATTED_PUBLIC_IP_HELPER_TEXT = export const NOT_NATTED_HELPER_TEXT = 'The Linode will not be able to access the internet. If this Linode needs access to the internet, we recommend checking the “Assign a public IPv4 address for this Linode” checkbox which will enable 1:1 NAT on the VPC interface.'; + +// Links +export const VPC_FEEDBACK_FORM_URL = + 'https://docs.google.com/forms/d/e/1FAIpQLScvWbTupCNsBF5cz5YEsv5oErHM4ONBZodDYi8KuOgC8fyfag/viewform'; + +export const NETWORK_INTERFACES_GUIDE_URL = + 'https://www.linode.com/docs/products/compute/compute-instances/guides/configuration-profiles/'; + +export const VPC_DOCS_LINK = + 'https://www.linode.com/docs/products/networking/vpc/'; From dd76e38ef1eef343af872b109d7d72540bf5c093 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Tue, 9 Jan 2024 17:42:54 -0500 Subject: [PATCH 2/8] Update link for 'Getting Started' guide --- packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx | 4 ++-- packages/manager/src/features/VPCs/constants.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx b/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx index a317d0c7aab..2698ebb1635 100644 --- a/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx +++ b/packages/manager/src/features/VPCs/VPCCreate/VPCCreate.tsx @@ -8,7 +8,7 @@ import { LandingHeader } from 'src/components/LandingHeader'; import { Notice } from 'src/components/Notice/Notice'; import { Paper } from 'src/components/Paper'; import { SubnetContent } from 'src/features/VPCs/VPCCreate/FormComponents/SubnetContent'; -import { VPC_DOCS_LINK } from 'src/features/VPCs/constants'; +import { VPC_GETTING_STARTED_LINK } from 'src/features/VPCs/constants'; import { useCreateVPC } from 'src/hooks/useCreateVPC'; import { CannotCreateVPCNotice } from './FormComponents/CannotCreateVPCNotice'; @@ -43,7 +43,7 @@ const VPCCreate = () => { pathname: `/vpcs/create`, }} docsLabel="Getting Started" - docsLink={VPC_DOCS_LINK} + docsLink={VPC_GETTING_STARTED_LINK} title="Create" /> {userCannotAddVPC && CannotCreateVPCNotice} diff --git a/packages/manager/src/features/VPCs/constants.ts b/packages/manager/src/features/VPCs/constants.ts index 78249912bcb..594b80134f0 100644 --- a/packages/manager/src/features/VPCs/constants.ts +++ b/packages/manager/src/features/VPCs/constants.ts @@ -57,3 +57,6 @@ export const NETWORK_INTERFACES_GUIDE_URL = export const VPC_DOCS_LINK = 'https://www.linode.com/docs/products/networking/vpc/'; + +export const VPC_GETTING_STARTED_LINK = + 'https://www.linode.com/docs/products/networking/vpc/get-started/'; From b124d63c356b7f67cbeb5e9da00c2385842c16b4 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Tue, 9 Jan 2024 17:59:46 -0500 Subject: [PATCH 3/8] Cloud version 1.109.1 --- packages/manager/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 92c0eb300db..75235d43e5f 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -2,7 +2,7 @@ "name": "linode-manager", "author": "Linode", "description": "The Linode Manager website", - "version": "1.109.0", + "version": "1.109.1", "private": true, "type": "module", "bugs": { From ff651b9fca1d6cf1863e53cb88d92986a0cbcdfb Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Wed, 10 Jan 2024 10:07:18 -0500 Subject: [PATCH 4/8] Update 'Learn More' link in Assign Linodes flow --- .../VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx | 12 +++++++++--- packages/manager/src/features/VPCs/constants.ts | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx index a79a67a4a2f..e9d08c8d027 100644 --- a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx +++ b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx @@ -17,7 +17,10 @@ import { TextField } from 'src/components/TextField'; import { TooltipIcon } from 'src/components/TooltipIcon'; import { Typography } from 'src/components/Typography'; import { defaultPublicInterface } from 'src/features/Linodes/LinodesCreate/LinodeCreate'; -import { VPC_AUTO_ASSIGN_IPV4_TOOLTIP } from 'src/features/VPCs/constants'; +import { + VPC_AUTO_ASSIGN_IPV4_TOOLTIP, + VPC_MULTIPLE_CONFIGURATIONS_LEARN_MORE_LINK, +} from 'src/features/VPCs/constants'; import { useFormattedDate } from 'src/hooks/useFormattedDate'; import { useUnassignLinode } from 'src/hooks/useUnassignLinode'; import { useAllLinodesQuery } from 'src/queries/linodes/linodes'; @@ -431,8 +434,11 @@ export const SubnetAssignLinodesDrawer = ( <> {MULTIPLE_CONFIGURATIONS_MESSAGE} - {/* @TODO VPC: add docs link */} - Learn more. + + {' '} + Learn more + + . { diff --git a/packages/manager/src/features/VPCs/constants.ts b/packages/manager/src/features/VPCs/constants.ts index 594b80134f0..bd11e5e5002 100644 --- a/packages/manager/src/features/VPCs/constants.ts +++ b/packages/manager/src/features/VPCs/constants.ts @@ -60,3 +60,6 @@ export const VPC_DOCS_LINK = export const VPC_GETTING_STARTED_LINK = 'https://www.linode.com/docs/products/networking/vpc/get-started/'; + +export const VPC_MULTIPLE_CONFIGURATIONS_LEARN_MORE_LINK = + 'https://www.linode.com/docs/products/compute/compute-instances/guides/configuration-profiles/'; From 52f1127ced927fb5b83bebd98e4e7618bc25d3f3 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Wed, 10 Jan 2024 10:08:58 -0500 Subject: [PATCH 5/8] Changelog for Cloud v1.109.1 --- packages/manager/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index 17dd41dba32..906f7036798 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2024-01-09] - v1.109.1 + +### Fixed: + +- VPC docs links on VPC landing, Create, and Detail pages and in "Assign Linodes" flow + + ## [2024-01-08] - v1.109.0 From bbcade8742d96dc59724ee5874f0607eb6918f53 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley Date: Wed, 10 Jan 2024 10:12:58 -0500 Subject: [PATCH 6/8] Adjust space for 'Learn More' link --- .../src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx index e9d08c8d027..ebe355e711a 100644 --- a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx +++ b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx @@ -433,9 +433,8 @@ export const SubnetAssignLinodesDrawer = ( {linodeConfigs.length > 1 && ( <> - {MULTIPLE_CONFIGURATIONS_MESSAGE} + {MULTIPLE_CONFIGURATIONS_MESSAGE}{' '} - {' '} Learn more . From 653b3f5b3e354dbe171aab9379e8f1677000b470 Mon Sep 17 00:00:00 2001 From: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:37:58 -0500 Subject: [PATCH 7/8] Update packages/manager/CHANGELOG.md Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> --- packages/manager/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index 906f7036798..d6959fbdbc7 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2024-01-09] - v1.109.1 +## [2024-01-10] - v1.109.1 ### Fixed: From 736a161f11439ed7ee2d4f55af8371ed827c69c8 Mon Sep 17 00:00:00 2001 From: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:38:34 -0500 Subject: [PATCH 8/8] fix: [M3-7623] - Fix VPC subnet Linode assignment text input (#10047) * Assert that entered Linode label is reflected in input value * Remove `inputValue` prop to fix Linode assignment field issue * Remove obsolete feature flag off state tests * Replace Autocomplete-based Linode selection with LinodeSelect * Add changelog entries Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> --- packages/manager/CHANGELOG.md | 7 ++++++- .../e2e/core/vpc/vpc-landing-page.spec.ts | 16 ---------------- .../e2e/core/vpc/vpc-linodes-update.spec.ts | 3 ++- .../e2e/core/vpc/vpc-navigation.spec.ts | 18 ------------------ .../VPCDetail/SubnetAssignLinodesDrawer.tsx | 11 +++++------ 5 files changed, 13 insertions(+), 42 deletions(-) diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index d6959fbdbc7..faf240503f1 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -8,7 +8,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed: -- VPC docs links on VPC landing, Create, and Detail pages and in "Assign Linodes" flow +- VPC docs links on VPC landing, Create, and Detail pages and in "Assign Linodes" flow ([#10050](https://github.com/linode/manager/pull/10050)) +- VPC subnet Linode assignment text field input issue ([#10047](https://github.com/linode/manager/pull/10047)) + +### Tests: + +- Remove obsolete VPC disabled state tests ([#10047](https://github.com/linode/manager/pull/10047)) ## [2024-01-08] - v1.109.0 diff --git a/packages/manager/cypress/e2e/core/vpc/vpc-landing-page.spec.ts b/packages/manager/cypress/e2e/core/vpc/vpc-landing-page.spec.ts index 0bb4b43981c..1a9963d85b7 100644 --- a/packages/manager/cypress/e2e/core/vpc/vpc-landing-page.spec.ts +++ b/packages/manager/cypress/e2e/core/vpc/vpc-landing-page.spec.ts @@ -356,20 +356,4 @@ describe('VPC landing page', () => { cy.findByText(MOCK_DELETE_VPC_ERROR).should('not.exist'); }); - - /* - * - Confirms that users cannot navigate to VPC landing page when feature is disabled. - */ - it('cannot access VPC landing page when feature is disabled', () => { - // TODO Remove this test once VPC feature flag is removed from codebase. - mockAppendFeatureFlags({ - vpc: makeFeatureFlagData(false), - }).as('getFeatureFlags'); - mockGetFeatureFlagClientstream().as('getClientStream'); - - cy.visitWithLogin('/vpcs'); - cy.wait(['@getFeatureFlags', '@getClientStream']); - - cy.findByText('Not Found').should('be.visible'); - }); }); diff --git a/packages/manager/cypress/e2e/core/vpc/vpc-linodes-update.spec.ts b/packages/manager/cypress/e2e/core/vpc/vpc-linodes-update.spec.ts index 400d699edf2..0836de3659f 100644 --- a/packages/manager/cypress/e2e/core/vpc/vpc-linodes-update.spec.ts +++ b/packages/manager/cypress/e2e/core/vpc/vpc-linodes-update.spec.ts @@ -156,7 +156,8 @@ describe('VPC assign/unassign flows', () => { cy.findByLabelText('Linodes') .should('be.visible') .click() - .type(mockLinode.label); + .type(mockLinode.label) + .should('have.value', mockLinode.label); ui.autocompletePopper .findByTitle(mockLinode.label) diff --git a/packages/manager/cypress/e2e/core/vpc/vpc-navigation.spec.ts b/packages/manager/cypress/e2e/core/vpc/vpc-navigation.spec.ts index b231239bb83..5128eea733f 100644 --- a/packages/manager/cypress/e2e/core/vpc/vpc-navigation.spec.ts +++ b/packages/manager/cypress/e2e/core/vpc/vpc-navigation.spec.ts @@ -28,22 +28,4 @@ describe('VPC navigation', () => { cy.url().should('endWith', '/vpcs'); }); - - /* - * - Confirms that VPC sidebar nav item is not shown when feature is disabled. - */ - it('does not show VPC navigation item when feature is disabled', () => { - // TODO Delete this test when VPC feature flag is removed from codebase. - mockAppendFeatureFlags({ - vpc: makeFeatureFlagData(false), - }).as('getFeatureFlags'); - mockGetFeatureFlagClientstream().as('getClientStream'); - - cy.visitWithLogin('/linodes'); - cy.wait(['@getFeatureFlags', '@getClientStream']); - - ui.nav.find().within(() => { - cy.findByText('VPC').should('not.exist'); - }); - }); }); diff --git a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx index ebe355e711a..1e9b3d35fa3 100644 --- a/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx +++ b/packages/manager/src/features/VPCs/VPCDetail/SubnetAssignLinodesDrawer.tsx @@ -43,6 +43,7 @@ import type { Linode, Subnet, } from '@linode/api-v4'; +import { LinodeSelect } from 'src/features/Linodes/LinodeSelect/LinodeSelect'; // @TODO VPC: if all subnet action menu item related components use (most of) this as their props, might be worth // putting this in a common file and naming it something like SubnetActionMenuItemProps or somthing @@ -384,19 +385,18 @@ export const SubnetAssignLinodesDrawer = ( />
{REGIONAL_LINODE_MESSAGE} - { - setFieldValue('selectedLinode', value); + { + setFieldValue('selectedLinode', selected); setAssignLinodesErrors({}); }} disabled={userCannotAssignLinodes} - inputValue={values.selectedLinode?.label || ''} label={'Linodes'} // We only want to be able to assign linodes that were not already assigned to this subnet options={linodeOptionsToAssign} placeholder="Select Linodes or type to search" sx={{ marginBottom: '8px' }} - value={values.selectedLinode || null} + value={values.selectedLinode?.id || null} />