Skip to content

Commit

Permalink
fix multiple ip css issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hana-linode committed Oct 1, 2024
1 parent 4cd457e commit 64a168f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@ export const ControlPlaneACLPane = (props: ControlPlaneACLProps) => {
);

return (
<FormControl data-testid="control-plane-ipacl-form">
<FormLabel
sx={(theme) => ({
'&&.MuiFormLabel-root.Mui-focused': {
color: theme.name === 'dark' ? 'white' : theme.color.black,
},
})}
id="ipacl-radio-buttons-group-label"
>
<Typography variant="inherit">
Control Plane Access Control (IPACL)
<>
<FormControl data-testid="control-plane-ipacl-form">
<FormLabel id="ipacl-radio-buttons-group-label">
<Typography variant="inherit">
Control Plane Access Control (IPACL)
</Typography>
</FormLabel>
<Typography mb={1}>
This is the text for Control Plane Access Control.{' '}
<Link to="https://www.linode.com/docs/guides/enable-lke-high-availability/">
Learn more.
</Link>
</Typography>
</FormLabel>
<IPACLCopy />
<Box sx={{ marginTop: 2, marginBottom: 1 }}>
<FormControlLabel
control={
<Toggle
Expand All @@ -80,11 +78,11 @@ export const ControlPlaneACLPane = (props: ControlPlaneACLProps) => {
onChange={(e) => handleChange(e)}
/>
}
label={'Enable IPACL'}
label="Enable IPACL"
/>
</Box>
</FormControl>
{enableControlPlaneACL && (
<Stack sx={{ marginBottom: 3 }}>
<Box sx={{ marginBottom: 3, maxWidth: 450 }}>
<MultipleIPInput
buttonText="Add IP Address"
ips={ipV4Addr}
Expand Down Expand Up @@ -113,8 +111,8 @@ export const ControlPlaneACLPane = (props: ControlPlaneACLProps) => {
placeholder="::/0"
title="IPv6 Addresses or CIDRs"
/>
</Stack>
</Box>
)}
</FormControl>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -324,40 +324,39 @@ export const KubeControlPlaneACLDrawer = (props: Props) => {
<Divider sx={{ marginTop: 3, marginBottom: 3 }} />
</>
)}

<RevisionID />

<AddressesCopy />
<ErrorMessage />
<MultipleIPInput
buttonText="Add IP Address"
ips={ipV4Addr}
onChange={handleIPv4ChangeCB}
onBlur={(_ips: ExtendedIP[]) => {
const validatedIPs = validateIPs(_ips, {
allowEmptyAddress: false,
errorMessage: 'Must be a valid IPv4 address.',
});
handleIPv4ChangeCB(validatedIPs);
}}
placeholder="0.0.0.0/0"
title="IPv4 Addresses or CIDRs"
/>
<MultipleIPInput
buttonText="Add IP Address"
ips={ipV6Addr}
onChange={handleIPv6ChangeCB}
onBlur={(_ips: ExtendedIP[]) => {
const validatedIPs = validateIPs(_ips, {
allowEmptyAddress: false,
errorMessage: 'Must be a valid IPv6 address.',
});
handleIPv6ChangeCB(validatedIPs);
}}
placeholder="::/0"
title="IPv6 Addresses or CIDRs"
/>

<Box sx={{ maxWidth: 450 }}>
<MultipleIPInput
buttonText="Add IP Address"
ips={ipV4Addr}
onChange={handleIPv4ChangeCB}
onBlur={(_ips: ExtendedIP[]) => {
const validatedIPs = validateIPs(_ips, {
allowEmptyAddress: false,
errorMessage: 'Must be a valid IPv4 address.',
});
handleIPv4ChangeCB(validatedIPs);
}}
placeholder="0.0.0.0/0"
title="IPv4 Addresses or CIDRs"
/>
<MultipleIPInput
buttonText="Add IP Address"
ips={ipV6Addr}
onChange={handleIPv6ChangeCB}
onBlur={(_ips: ExtendedIP[]) => {
const validatedIPs = validateIPs(_ips, {
allowEmptyAddress: false,
errorMessage: 'Must be a valid IPv6 address.',
});
handleIPv6ChangeCB(validatedIPs);
}}
placeholder="::/0"
title="IPv6 Addresses or CIDRs"
/>
</Box>
<ActionsPanel
primaryButtonProps={{
'data-testid': 'update-acl-button',
Expand All @@ -368,7 +367,6 @@ export const KubeControlPlaneACLDrawer = (props: Props) => {
}}
secondaryButtonProps={{ label: 'Cancel', onClick: closeDrawer }}
/>

<ClusterNeedsMigration />
</Stack>
</DrawerContent>
Expand Down

0 comments on commit 64a168f

Please sign in to comment.