From 7b07a510061f90e8698539919df4079dc24df85f Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Thu, 20 Apr 2023 13:40:11 -0500
Subject: [PATCH 1/9] refactor: [M3-6307] - MUIv5 Migration - SRC > Components
> CopyTooltip
---
.../components/CopyTooltip/CopyTooltip.stories.mdx | 12 +++++-------
.../src/components/CopyTooltip/CopyTooltip.tsx | 2 --
packages/manager/src/components/CopyTooltip/index.ts | 2 --
.../components/CopyableAndDownloadableTextField.tsx | 2 +-
.../CopyableTextField/CopyableTextField.tsx | 2 +-
.../src/components/LinodeCLIModal/LinodeCLIModal.tsx | 2 +-
.../src/components/StackScript/StackScript.tsx | 2 +-
.../DatabaseSummaryConnectionDetails.tsx | 2 +-
.../features/EntityTransfers/RenderTransferRow.tsx | 2 +-
.../KubernetesClusterDetail/KubeConfigDrawer.tsx | 2 +-
.../NodePoolsDisplay/NodeTable.tsx | 2 +-
.../Longview/shared/InstallationInstructions.tsx | 2 +-
.../AccessKeyLanding/AccessKeyTable.tsx | 2 +-
.../BucketDetail/ObjectDetailsDrawer.tsx | 2 +-
.../BucketLanding/BucketDetailsDrawer.tsx | 2 +-
.../src/features/linodes/LinodeEntityDetail.tsx | 2 +-
.../linodes/LinodesCreate/CodeBlock/index.tsx | 2 +-
.../LinodeNetworking/LinodeNetworking.tsx | 2 +-
.../features/linodes/LinodesLanding/IPAddress.tsx | 2 +-
19 files changed, 21 insertions(+), 27 deletions(-)
delete mode 100644 packages/manager/src/components/CopyTooltip/index.ts
diff --git a/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx b/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
index cd05fdf631c..2ca60279f6a 100644
--- a/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
+++ b/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
@@ -1,22 +1,20 @@
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
-import CopyTooltip from 'src/components/CopyTooltip/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
(
-
+
- )
+ ),
]}
/>
export const Template = (args) => {
- return (
-
- );
+ return
;
};
# Copy Tooltip
@@ -42,4 +40,4 @@ If horizontal space is limited, truncate the content.
-
+
diff --git a/packages/manager/src/components/CopyTooltip/CopyTooltip.tsx b/packages/manager/src/components/CopyTooltip/CopyTooltip.tsx
index 9ffa7919891..17275a96b56 100644
--- a/packages/manager/src/components/CopyTooltip/CopyTooltip.tsx
+++ b/packages/manager/src/components/CopyTooltip/CopyTooltip.tsx
@@ -80,5 +80,3 @@ export const CopyTooltip = (props: Props) => {
);
};
-
-export default CopyTooltip;
diff --git a/packages/manager/src/components/CopyTooltip/index.ts b/packages/manager/src/components/CopyTooltip/index.ts
deleted file mode 100644
index 356c35f6b44..00000000000
--- a/packages/manager/src/components/CopyTooltip/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import CopyTooltip from './CopyTooltip';
-export default CopyTooltip;
diff --git a/packages/manager/src/components/CopyableAndDownloadableTextField.tsx b/packages/manager/src/components/CopyableAndDownloadableTextField.tsx
index b96016768b4..4eaf8e275d0 100644
--- a/packages/manager/src/components/CopyableAndDownloadableTextField.tsx
+++ b/packages/manager/src/components/CopyableAndDownloadableTextField.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import snakeCase from 'lodash/snakeCase';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import DownloadTooltip from 'src/components/DownloadTooltip';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/components/CopyableTextField/CopyableTextField.tsx b/packages/manager/src/components/CopyableTextField/CopyableTextField.tsx
index 8c35a17b674..ad278edba64 100644
--- a/packages/manager/src/components/CopyableTextField/CopyableTextField.tsx
+++ b/packages/manager/src/components/CopyableTextField/CopyableTextField.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import TextField, { Props as TextFieldProps } from 'src/components/TextField';
diff --git a/packages/manager/src/components/LinodeCLIModal/LinodeCLIModal.tsx b/packages/manager/src/components/LinodeCLIModal/LinodeCLIModal.tsx
index 4a815ed3f4c..b3ae478cf32 100644
--- a/packages/manager/src/components/LinodeCLIModal/LinodeCLIModal.tsx
+++ b/packages/manager/src/components/LinodeCLIModal/LinodeCLIModal.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import Dialog from 'src/components/Dialog';
-import CopyTooltip from '../CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { sendCLIClickEvent } from 'src/utilities/ga';
const useStyles = makeStyles((theme: Theme) => ({
diff --git a/packages/manager/src/components/StackScript/StackScript.tsx b/packages/manager/src/components/StackScript/StackScript.tsx
index 740e0c604fb..f72512cfc96 100644
--- a/packages/manager/src/components/StackScript/StackScript.tsx
+++ b/packages/manager/src/components/StackScript/StackScript.tsx
@@ -4,7 +4,7 @@ import { Theme, useTheme } from '@mui/material/styles';
import * as React from 'react';
import { Link, useHistory } from 'react-router-dom';
import Button from 'src/components/Button';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Chip from 'src/components/core/Chip';
import Divider from 'src/components/core/Divider';
import Typography from 'src/components/core/Typography';
diff --git a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx
index 6ec3087ee79..533058e1a96 100644
--- a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx
+++ b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx
@@ -6,7 +6,7 @@ import * as React from 'react';
import DownloadIcon from 'src/assets/icons/lke-download.svg';
import Button from 'src/components/Button';
import { CircleProgress } from 'src/components/CircleProgress';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Box from 'src/components/core/Box';
import Typography from 'src/components/core/Typography';
import { TooltipIcon } from 'src/components/TooltipIcon/TooltipIcon';
diff --git a/packages/manager/src/features/EntityTransfers/RenderTransferRow.tsx b/packages/manager/src/features/EntityTransfers/RenderTransferRow.tsx
index 1f2244b846b..54c13dd3558 100644
--- a/packages/manager/src/features/EntityTransfers/RenderTransferRow.tsx
+++ b/packages/manager/src/features/EntityTransfers/RenderTransferRow.tsx
@@ -1,6 +1,6 @@
import { TransferEntities } from '@linode/api-v4/lib/entity-transfers';
import * as React from 'react';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Hidden from 'src/components/core/Hidden';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeConfigDrawer.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeConfigDrawer.tsx
index 591b7e39c67..b7ae0d2713f 100644
--- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeConfigDrawer.tsx
+++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeConfigDrawer.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import Download from 'src/assets/icons/download.svg';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Grid from '@mui/material/Unstable_Grid2';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodeTable.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodeTable.tsx
index cf19c2c7570..7651d3efce4 100644
--- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodeTable.tsx
+++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodeTable.tsx
@@ -2,7 +2,7 @@ import { PoolNodeResponse } from '@linode/api-v4/lib/kubernetes';
import { APIError } from '@linode/api-v4/lib/types';
import * as React from 'react';
import { Link } from 'react-router-dom';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import TableBody from 'src/components/core/TableBody';
diff --git a/packages/manager/src/features/Longview/shared/InstallationInstructions.tsx b/packages/manager/src/features/Longview/shared/InstallationInstructions.tsx
index a01348ac562..b94543a5567 100644
--- a/packages/manager/src/features/Longview/shared/InstallationInstructions.tsx
+++ b/packages/manager/src/features/Longview/shared/InstallationInstructions.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Typography from 'src/components/core/Typography';
import Grid from 'src/components/Grid';
diff --git a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable.tsx b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable.tsx
index 21c848bfdc5..e7f9c5c1711 100644
--- a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable.tsx
+++ b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { ObjectStorageKey } from '@linode/api-v4/lib/object-storage';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import TableBody from 'src/components/core/TableBody';
diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/ObjectDetailsDrawer.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/ObjectDetailsDrawer.tsx
index 5b4afc0a8cf..a1e2cf5c2d9 100644
--- a/packages/manager/src/features/ObjectStorage/BucketDetail/ObjectDetailsDrawer.tsx
+++ b/packages/manager/src/features/ObjectStorage/BucketDetail/ObjectDetailsDrawer.tsx
@@ -4,7 +4,7 @@ import {
updateObjectACL,
} from '@linode/api-v4/lib/object-storage';
import * as React from 'react';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Divider from 'src/components/core/Divider';
import { makeStyles } from '@mui/styles';
import Typography from 'src/components/core/Typography';
diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx
index 4f981508205..83ad25ad3b3 100644
--- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx
+++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx
@@ -5,7 +5,7 @@ import {
} from '@linode/api-v4/lib/object-storage';
import * as React from 'react';
import { Link } from 'react-router-dom';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Divider from 'src/components/core/Divider';
import { makeStyles } from '@mui/styles';
import Typography from 'src/components/core/Typography';
diff --git a/packages/manager/src/features/linodes/LinodeEntityDetail.tsx b/packages/manager/src/features/linodes/LinodeEntityDetail.tsx
index a90285eda69..82d2f96ee9d 100644
--- a/packages/manager/src/features/linodes/LinodeEntityDetail.tsx
+++ b/packages/manager/src/features/linodes/LinodeEntityDetail.tsx
@@ -7,7 +7,7 @@ import { Link } from 'react-router-dom';
import { HashLink } from 'react-router-hash-link';
import { compose } from 'recompose';
import Button from 'src/components/Button';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Box from 'src/components/core/Box';
import Chip from 'src/components/core/Chip';
import Hidden from 'src/components/core/Hidden';
diff --git a/packages/manager/src/features/linodes/LinodesCreate/CodeBlock/index.tsx b/packages/manager/src/features/linodes/LinodesCreate/CodeBlock/index.tsx
index 3eb059d8fec..528fcf7cb89 100644
--- a/packages/manager/src/features/linodes/LinodesCreate/CodeBlock/index.tsx
+++ b/packages/manager/src/features/linodes/LinodesCreate/CodeBlock/index.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import HighlightedMarkdown from 'src/components/HighlightedMarkdown';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { sendEvent } from 'src/utilities/ga';
import { useCodeBlockStyles } from './styles';
export interface Props {
diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx
index adcd5800412..5aed1aad77b 100644
--- a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx
+++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx
@@ -19,7 +19,7 @@ import { compose as recompose } from 'recompose';
import AddNewLink from 'src/components/AddNewLink';
import Button from 'src/components/Button';
import { CircleProgress } from 'src/components/CircleProgress';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import Hidden from 'src/components/core/Hidden';
import Paper from 'src/components/core/Paper';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
diff --git a/packages/manager/src/features/linodes/LinodesLanding/IPAddress.tsx b/packages/manager/src/features/linodes/LinodesLanding/IPAddress.tsx
index 67c52292f35..54bceaef976 100644
--- a/packages/manager/src/features/linodes/LinodesLanding/IPAddress.tsx
+++ b/packages/manager/src/features/linodes/LinodesLanding/IPAddress.tsx
@@ -1,7 +1,7 @@
import copy from 'copy-to-clipboard';
import { tail } from 'ramda';
import * as React from 'react';
-import CopyTooltip from 'src/components/CopyTooltip';
+import { CopyTooltip } from 'src/components/CopyTooltip/CopyTooltip';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import ShowMore from 'src/components/ShowMore';
From 7bf423f354b492d8a16f34f3d83d7bc7e4b4cf0a Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Fri, 21 Apr 2023 08:56:59 -0500
Subject: [PATCH 2/9] Update
packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com>
---
.../manager/src/components/CopyTooltip/CopyTooltip.stories.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx b/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
index 2ca60279f6a..b064c36241a 100644
--- a/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
+++ b/packages/manager/src/components/CopyTooltip/CopyTooltip.stories.mdx
@@ -40,4 +40,4 @@ If horizontal space is limited, truncate the content.
-
+
From 7d35557509f9bf48b5071a71b2aeccfec77adbef Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Tue, 25 Apr 2023 07:12:12 -0500
Subject: [PATCH 3/9] Update CHANGELOG.md
---
CHANGELOG.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5d25843f6b..9c25110a1e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added:
- Metadata
- Add No Results section for Marketplace Search #8999
+- Add Private IP checkbox when cloning a Linode #9039
### Changed:
- `
` can now dynamically get country flag and group all countrys #8996
@@ -33,6 +34,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- MUIv5 Migration - Components > CreateLinodeDisabled #9015
- MUIv5 Migration - `Components > DateTimeDisplay, DebouncedSearchTextField` #9007
- MUIv5 Migration - `SRC > Components > ConfirmationDialog` #9016
+- MUIv5 Migration - `SRC > Components > CopyTooltip` #9040
+- - MUIv5 Migration - `SRC > Components > CopyTooltip` #9040
- Add basic Adobe Analytics tracking #8989
## [2023-04-18] - v1.91.1
From dced1f66624d6df8e6f43f354e793fd14be1e8f9 Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Tue, 25 Apr 2023 11:33:07 -0500
Subject: [PATCH 4/9] fix: [M3-6510] - modifying Configuration Profile in Cloud
breaks with VLANs
---
.../LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
index c26acb74f20..9e8a80cbc2a 100644
--- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
+++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
@@ -425,6 +425,11 @@ const LinodeConfigDialog: React.FC
= (props) => {
(thisOption) => thisOption.value === config?.root_device
)
);
+ const configInterfaces = config?.interfaces?.map(
+ ({ ipam_address, label, purpose }) => {
+ return { ipam_address, label, purpose };
+ }
+ );
resetForm({
values: {
useCustomRoot: isUsingCustomRoot(config.root_device),
@@ -438,7 +443,7 @@ const LinodeConfigDialog: React.FC = (props) => {
virt_mode: config.virt_mode,
helpers: config.helpers,
root_device: config.root_device,
- interfaces: interfacesToState(config.interfaces),
+ interfaces: interfacesToState(configInterfaces),
setMemoryLimit:
config.memory_limit !== 0 ? 'set_limit' : 'no_limit',
},
From b403986944d058441a84e6888f48a69a3349187f Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Tue, 25 Apr 2023 11:41:47 -0500
Subject: [PATCH 5/9] Update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c25110a1e4..ad6656ab50c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Event entities should only be linked for true labels
- Radio button hover effect #9031
- Prevent form submission unless action was taken (IP transfer & IP sharing modals) #5976
+- fix: [M3-6510] - Modifying Configuration Profile in Cloud breaks with VLANs #9053
### Tech Stories:
- MUIv5 Migration - Components > CircleProgress #9028
From 2c9c612178f7edaa6559cdb2e09e7342d2be0726 Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Tue, 25 Apr 2023 16:06:59 -0500
Subject: [PATCH 6/9] Update CHANGELOG.md
Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad6656ab50c..6eac1a70d42 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Event entities should only be linked for true labels
- Radio button hover effect #9031
- Prevent form submission unless action was taken (IP transfer & IP sharing modals) #5976
-- fix: [M3-6510] - Modifying Configuration Profile in Cloud breaks with VLANs #9053
+Inability to edit and save Linode Configurations #9053
### Tech Stories:
- MUIv5 Migration - Components > CircleProgress #9028
From ae03928ddaa12dc33cec428f4df78cc0ab9f0026 Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Wed, 26 Apr 2023 09:34:18 -0500
Subject: [PATCH 7/9] Update CHANGELOG.md
Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com>
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6eac1a70d42..621d401224c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Event entities should only be linked for true labels
- Radio button hover effect #9031
- Prevent form submission unless action was taken (IP transfer & IP sharing modals) #5976
-Inability to edit and save Linode Configurations #9053
+- Inability to edit and save Linode Configurations #9053
### Tech Stories:
- MUIv5 Migration - Components > CircleProgress #9028
From b7cf0738be3d669909883992e6211b7194fa006c Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Wed, 26 Apr 2023 09:51:58 -0500
Subject: [PATCH 8/9] Add missing type id for Interface
---
packages/api-v4/src/linodes/types.ts | 6 +++++-
.../factories/linodeConfigInterfaceFactory.ts | 1 +
.../linodes/LinodesCreate/LinodeCreate.tsx | 6 +++---
.../LinodeSettings/InterfaceSelect.tsx | 7 +++++--
.../LinodeSettings/LinodeConfigDialog.tsx | 17 +++++++++--------
5 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/packages/api-v4/src/linodes/types.ts b/packages/api-v4/src/linodes/types.ts
index c0832fbc4bc..77e1aba696e 100644
--- a/packages/api-v4/src/linodes/types.ts
+++ b/packages/api-v4/src/linodes/types.ts
@@ -149,10 +149,14 @@ export type LinodeStatus =
export type InterfacePurpose = 'public' | 'vlan';
export interface Interface {
+ id: number;
label: string | null;
purpose: InterfacePurpose;
ipam_address: string | null;
}
+
+export type InterfacePayload = Omit;
+
export interface Config {
id: number;
kernel: string;
@@ -261,7 +265,7 @@ export interface LinodeConfigCreationData {
devtmpfs_automount: boolean;
};
root_device: string;
- interfaces?: Interface[];
+ interfaces?: InterfacePayload[];
}
export interface PriceObject {
diff --git a/packages/manager/src/factories/linodeConfigInterfaceFactory.ts b/packages/manager/src/factories/linodeConfigInterfaceFactory.ts
index 20a3bf30408..68506f4ecdd 100644
--- a/packages/manager/src/factories/linodeConfigInterfaceFactory.ts
+++ b/packages/manager/src/factories/linodeConfigInterfaceFactory.ts
@@ -3,6 +3,7 @@ import { Interface } from '@linode/api-v4/lib/linodes/types';
export const LinodeConfigInterfaceFactory = Factory.Sync.makeFactory(
{
+ id: Factory.each((i) => i),
label: Factory.each((i) => `interface-${i}`),
purpose: 'vlan',
ipam_address: '10.0.0.1/24',
diff --git a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx
index 30712691ebb..7da0da6494f 100644
--- a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx
+++ b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx
@@ -1,4 +1,4 @@
-import { Interface, restoreBackup } from '@linode/api-v4/lib/linodes';
+import { InterfacePayload, restoreBackup } from '@linode/api-v4/lib/linodes';
import { Tag } from '@linode/api-v4/lib/tags/types';
import { Theme } from '@mui/material/styles';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
@@ -151,7 +151,7 @@ interface Props {
showGeneralError?: boolean;
vlanLabel: string | null;
ipamAddress: string | null;
- handleVLANChange: (updatedInterface: Interface) => void;
+ handleVLANChange: (updatedInterface: InterfacePayload) => void;
showAgreement: boolean;
showApiAwarenessModal: boolean;
handleAgreementChange: () => void;
@@ -870,7 +870,7 @@ export class LinodeCreate extends React.PureComponent<
}
}
-const defaultPublicInterface: Interface = {
+const defaultPublicInterface: InterfacePayload = {
purpose: 'public',
label: '',
ipam_address: '',
diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx
index 0569ec07eeb..b6966d1b525 100644
--- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx
+++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx
@@ -1,4 +1,7 @@
-import { Interface, InterfacePurpose } from '@linode/api-v4/lib/linodes/types';
+import {
+ InterfacePayload,
+ InterfacePurpose,
+} from '@linode/api-v4/lib/linodes/types';
import * as React from 'react';
import Divider from 'src/components/core/Divider';
import { makeStyles } from '@mui/styles';
@@ -32,7 +35,7 @@ export interface Props {
// To allow for empty slots, which the API doesn't account for
export type ExtendedPurpose = InterfacePurpose | 'none';
-export interface ExtendedInterface extends Omit {
+export interface ExtendedInterface extends Omit {
purpose: ExtendedPurpose;
}
diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
index 9e8a80cbc2a..8278c1579d4 100644
--- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
+++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
@@ -193,10 +193,15 @@ const pathsOptions = [
];
const interfacesToState = (interfaces?: Interface[]) => {
- if (!interfaces || interfaces.length === 0) {
+ const processedInterfaces = interfaces?.map(
+ ({ ipam_address, label, purpose }) => {
+ return { ipam_address, label, purpose };
+ }
+ );
+ if (!processedInterfaces || processedInterfaces.length === 0) {
return defaultInterfaceList;
}
- return padInterfaceList(interfaces);
+ return padInterfaceList(processedInterfaces);
};
const interfacesToPayload = (interfaces?: ExtendedInterface[]) => {
@@ -425,11 +430,7 @@ const LinodeConfigDialog: React.FC = (props) => {
(thisOption) => thisOption.value === config?.root_device
)
);
- const configInterfaces = config?.interfaces?.map(
- ({ ipam_address, label, purpose }) => {
- return { ipam_address, label, purpose };
- }
- );
+
resetForm({
values: {
useCustomRoot: isUsingCustomRoot(config.root_device),
@@ -443,7 +444,7 @@ const LinodeConfigDialog: React.FC = (props) => {
virt_mode: config.virt_mode,
helpers: config.helpers,
root_device: config.root_device,
- interfaces: interfacesToState(configInterfaces),
+ interfaces: interfacesToState(config.interfaces),
setMemoryLimit:
config.memory_limit !== 0 ? 'set_limit' : 'no_limit',
},
From c7bb561bf51f39290f3d260d89632aa9ae2754f9 Mon Sep 17 00:00:00 2001
From: cpathipa <119517080+cpathipa@users.noreply.github.com>
Date: Wed, 26 Apr 2023 11:36:06 -0500
Subject: [PATCH 9/9] PR feedback
---
.../LinodeSettings/LinodeConfigDialog.tsx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
index 8278c1579d4..0a3928edace 100644
--- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
+++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx
@@ -193,15 +193,13 @@ const pathsOptions = [
];
const interfacesToState = (interfaces?: Interface[]) => {
- const processedInterfaces = interfaces?.map(
- ({ ipam_address, label, purpose }) => {
- return { ipam_address, label, purpose };
- }
- );
- if (!processedInterfaces || processedInterfaces.length === 0) {
+ if (!interfaces || interfaces.length === 0) {
return defaultInterfaceList;
}
- return padInterfaceList(processedInterfaces);
+ const interfacesPayload = interfaces.map(
+ ({ ipam_address, label, purpose }) => ({ ipam_address, label, purpose })
+ );
+ return padInterfaceList(interfacesPayload);
};
const interfacesToPayload = (interfaces?: ExtendedInterface[]) => {