-
Notifications
You must be signed in to change notification settings - Fork 367
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
upcoming: [M3-7220, M3-7355] - Add DC Get Well logic to various user flows pt2 and cleanup #9945
Changes from all commits
f55faf4
be6517f
f1583d1
443374b
5f21ca8
96fc62d
cd27c42
8b3dd0a
c808a5c
7aa827b
6756ee3
cab1a59
9e95bb8
944da0f
d4b22b7
ddaf20a
4bd3378
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Add DC Get Well logic to various user flows pt2 and cleanup logic ([#9945](https://github.com/linode/manager/pull/9945)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ import { HAControlPlane } from './HAControlPlane'; | |
import { NodePoolPanel } from './NodePoolPanel'; | ||
|
||
export const CreateCluster = () => { | ||
const classes = useStyles(); | ||
const { classes } = useStyles(); | ||
const [selectedRegionID, setSelectedRegionID] = React.useState<string>(''); | ||
const [nodePools, setNodePools] = React.useState<KubeNodePoolResponse[]>([]); | ||
const [label, setLabel] = React.useState<string | undefined>(); | ||
|
@@ -82,15 +82,6 @@ export const CreateCluster = () => { | |
mutateAsync: createKubernetesCluster, | ||
} = useCreateKubernetesClusterMutation(); | ||
|
||
// Only include regions that have LKE capability | ||
const filteredRegions = React.useMemo(() => { | ||
return regionsData | ||
? regionsData.filter((thisRegion) => | ||
thisRegion.capabilities.includes('Kubernetes') | ||
) | ||
: []; | ||
}, [regionsData]); | ||
|
||
const { | ||
data: versionData, | ||
isError: versionLoadError, | ||
|
@@ -101,12 +92,6 @@ export const CreateCluster = () => { | |
value: thisVersion.id, | ||
})); | ||
|
||
React.useEffect(() => { | ||
if (filteredRegions.length === 1 && !selectedRegionID) { | ||
setSelectedRegionID(filteredRegions[0].id); | ||
} | ||
}, [filteredRegions, selectedRegionID]); | ||
Comment on lines
-104
to
-108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deleted this logic to preselect a region if there's only one region with kubernetes capability: we've moved the region filtering logic inside the RegionSelect ( |
||
|
||
React.useEffect(() => { | ||
if (versions.length > 0) { | ||
setVersion(getLatestVersion(versions)); | ||
|
@@ -224,7 +209,6 @@ export const CreateCluster = () => { | |
onChange={(e: React.ChangeEvent<HTMLInputElement>) => | ||
updateLabel(e.target.value) | ||
} | ||
className={classes.inputWidth} | ||
data-qa-label-input | ||
errorText={errorMap.label} | ||
label="Cluster Label" | ||
|
@@ -239,9 +223,9 @@ export const CreateCluster = () => { | |
helperText: <RegionHelperText mb={2} />, | ||
helperTextPosition: 'top', | ||
}} | ||
className={classes.regionSubtitle} | ||
currentCapability="Kubernetes" | ||
errorText={errorMap.region} | ||
regions={filteredRegions} | ||
regions={regionsData} | ||
selectedId={selectedId} | ||
/> | ||
{showPricingNotice && ( | ||
|
@@ -252,7 +236,6 @@ export const CreateCluster = () => { | |
onChange={(selected: Item<string>) => { | ||
setVersion(selected); | ||
}} | ||
className={classes.inputWidth} | ||
errorText={errorMap.k8s_version} | ||
isClearable={false} | ||
label="Kubernetes Version" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"there is no capability associated with Images yet" -- is this something API is planning on adding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely sure to be honest. Images is currently out of scope, but we'll make a backlog ticket to ask API about this soon
Edit: M3-7525