-
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-7520] - AGLB Fixes and Improvements #9954
Conversation
Coverage Report: β
|
label: '', | ||
type, | ||
}, | ||
initialValues: initialValues[type], |
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.
Added dynamic initialValues because ca
certs cannot have a key
|
||
const items = [ | ||
{ | ||
title: 'Hostname', | ||
value: <IPAddress ips={[loadbalancer?.hostname ?? '']} isHovered />, | ||
value: <IPAddress ips={[loadbalancer?.hostname ?? 'None']} isHovered />, |
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.
Show None
instead of nothing when there is no hostname.
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.
label: route.label, | ||
protocol: route.protocol, |
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.
The API needs us to pass these values. Passing protocol
also helps our validation.
@@ -36,13 +39,23 @@ export const LoadBalancerRow = ({ handlers, loadBalancer }: Props) => { | |||
</TableCell> | |||
</Hidden> | |||
<Hidden smDown> | |||
<TableCell>{hostname}</TableCell> | |||
<TableCell> | |||
{hostname ? <IPAddress ips={[hostname]} /> : 'None'} |
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.
Show None
if there is no hostname. Also makes the hostname copyable.
</Hidden> | ||
<Hidden mdDown> | ||
<TableCell> | ||
{regions.map((region) => ( | ||
<Stack py={1} spacing={0.5}> | ||
{alphaRegions.map(({ id, label }) => ( |
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.
We're going to hardcode the regions for now because the dev environment does not return the production regions we need.
@@ -21,6 +21,10 @@ export const Ports = ({ loadbalancerId }: PortProps) => { | |||
return <Skeleton sx={{ minWidth: '100px' }} />; | |||
} | |||
|
|||
if (ports?.length === 0) { | |||
return <Typography>None</Typography>; |
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.
Shows None
is no configurations have been setup
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.
Changes here match APIv4
export const getNormzlizedRulePayload = (rule: RulePayload) => ({ | ||
match_condition: { | ||
...rule.match_condition, | ||
hostname: rule.match_condition.hostname | ||
? rule.match_condition.hostname | ||
: null, | ||
}, | ||
service_targets: rule.service_targets, | ||
}); |
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 really didn't want to have to do this, but we need to so that the API accepts our payload. I tired doing this other ways but this seemed to be the most typesafe and straightforward way
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerSummary.tsx
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerSummary.tsx
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/Routes/utils.test.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/Routes/utils.ts
Outdated
Show resolved
Hide resolved
...manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/ServiceTargetDrawer.tsx
Outdated
Show resolved
Hide resolved
...manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/ServiceTargetDrawer.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/utils.test.ts
Outdated
Show resolved
Hide resolved
Verified:
|
'be.visible' | ||
); | ||
}); | ||
// TODO: AGLB - Confirm that regions from the API are listed for load balancer |
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.
were these not working?
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.
The Dev environment does not have the same regions as prod, so we need to hardcode for now.
path: string; | ||
host: string; | ||
path?: string | null; | ||
host?: string | null; |
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.
do we need this to be both optional and potentially null?
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 think we want both because we want users to be able to pass null
or completely omit the property.
@@ -169,7 +169,7 @@ export interface ServiceTarget extends ServiceTargetPayload { | |||
|
|||
export interface Endpoint { | |||
ip: string; | |||
host?: string; | |||
host?: string | null; |
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.
same here
@tyler-akamai We will clamp the regions post-alpha |
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.
It's exciting to see things working more smoothly, nicely done! A couple minor things of feedback, approving pending those are addressed.
Verified:
β
Fixed ActionCell styles
β
Add rule drawer now has dynamic copy depending on the protocol
β
Error notice spacing looks good
Fixes a lot of validation / payloads to match what the Linode API allows π
- β I seem to be getting an error now on the service target label field when trying to add a rule. See screencap below.
β
Able to add TCP Rules now (this works, despite the visible error)
β
Able to delete Rules
Screen.Recording.2023-12-05.at.9.23.55.AM.mov
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerSummary.tsx
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/Routes/utils.test.ts
Outdated
Show resolved
Hide resolved
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.
Thanks for the π§ͺ !
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/Routes/utils.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/utils.test.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerLanding/LoadBalancerRow.tsx
Outdated
Show resolved
Hide resolved
|
||
const items = [ | ||
{ | ||
title: 'Hostname', | ||
value: <IPAddress ips={[loadbalancer?.hostname ?? '']} isHovered />, | ||
value: <IPAddress ips={[loadbalancer?.hostname ?? 'None']} isHovered />, |
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.
@@ -38,7 +38,7 @@ export const LoadBalancerCertificates = () => { | |||
Upload certificates to your Load Balancer for use across your | |||
Configurations and Service Targets. | |||
</Typography> | |||
<Tabs index={tabIndex === -1 ? 0 : tabIndex}> | |||
<Tabs index={tabIndex === -1 ? 0 : tabIndex} onChange={() => null}> |
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.
Oh yay, thank you ππΌ I noticed this and was trying to decide the best place to mention it.
Description π
Preview π·
How to test π§ͺ
Prerequisites
dev-test-aglb
credentialsVerification steps
Description
sectionAs an Author I have considered π€