From 09e71b650f39d3a3bfcf223c4e1aefbfebba126f Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Wed, 1 May 2024 09:16:25 -0700 Subject: [PATCH 1/4] Surface interface select errors --- .../LinodeSettings/InterfaceSelect.tsx | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx index 524eda85802..4b40bf35fda 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx @@ -5,6 +5,7 @@ import * as React from 'react'; import { Divider } from 'src/components/Divider'; import Select from 'src/components/EnhancedSelect/Select'; +import { Notice } from 'src/components/Notice/Notice'; import { Stack } from 'src/components/Stack'; import { TextField } from 'src/components/TextField'; import { Typography } from 'src/components/Typography'; @@ -384,25 +385,30 @@ export const InterfaceSelect = (props: InterfaceSelectProps) => { return ( {fromAddonsPanel ? null : ( - - 0 + ? purposeOptions + : purposeOptions.filter( + (thisPurposeOption) => thisPurposeOption.value !== 'none' + ) + } + value={purposeOptions.find( + (thisOption) => thisOption.value === purpose + )} + disabled={readOnly} + isClearable={false} + label={`eth${slotNumber}`} + onChange={handlePurposeChange} + /> + {unavailableInRegionHelperTextJSX} + )} {purpose === 'vlan' && From e5cc1d2e56e659e8c29b6c151a8b944948007588 Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Wed, 1 May 2024 09:20:20 -0700 Subject: [PATCH 2/4] Revert unintentional grid change --- .../LinodeSettings/InterfaceSelect.tsx | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx index 4b40bf35fda..82929822148 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx @@ -385,30 +385,28 @@ export const InterfaceSelect = (props: InterfaceSelectProps) => { return ( {fromAddonsPanel ? null : ( - - - {errors.primaryError && ( - + + {errors.primaryError && ( + + )} + 0 - ? purposeOptions - : purposeOptions.filter( - (thisPurposeOption) => thisPurposeOption.value !== 'none' - ) - } - value={purposeOptions.find( - (thisOption) => thisOption.value === purpose - )} - disabled={readOnly} - isClearable={false} - label={`eth${slotNumber}`} - onChange={handlePurposeChange} - /> - {unavailableInRegionHelperTextJSX} - + disabled={readOnly} + isClearable={false} + label={`eth${slotNumber}`} + onChange={handlePurposeChange} + /> + {unavailableInRegionHelperTextJSX} )} {purpose === 'vlan' && From f4db6021248167840de242e4d6c3050f48eb6400 Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Wed, 1 May 2024 09:49:02 -0700 Subject: [PATCH 3/4] Fix styling for surfaced error --- .../LinodeSettings/InterfaceSelect.tsx | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx index 82929822148..e4f9ccdbdb4 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx @@ -385,29 +385,33 @@ export const InterfaceSelect = (props: InterfaceSelectProps) => { return ( {fromAddonsPanel ? null : ( - - {errors.primaryError && ( - - )} - 0 + ? purposeOptions + : purposeOptions.filter( + (thisPurposeOption) => thisPurposeOption.value !== 'none' + ) + } + value={purposeOptions.find( + (thisOption) => thisOption.value === purpose + )} + disabled={readOnly} + isClearable={false} + label={`eth${slotNumber}`} + onChange={handlePurposeChange} + /> + {unavailableInRegionHelperTextJSX} + + )} {purpose === 'vlan' && regionHasVLANs !== false && From cb42f66f8ce505f3dfb62f23328f1a7e2d4ab65c Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Tue, 28 May 2024 14:01:04 -0700 Subject: [PATCH 4/4] Added changeset: Surface interface error in Linode Config dialog --- packages/manager/.changeset/pr-10429-fixed-1716930064091.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-10429-fixed-1716930064091.md diff --git a/packages/manager/.changeset/pr-10429-fixed-1716930064091.md b/packages/manager/.changeset/pr-10429-fixed-1716930064091.md new file mode 100644 index 00000000000..493441e9fe4 --- /dev/null +++ b/packages/manager/.changeset/pr-10429-fixed-1716930064091.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +Surface interface error in Linode Config dialog ([#10429](https://github.com/linode/manager/pull/10429))