feat: [M3-7254] - Add AGLB Routes - Rule Edit Drawer#9778
feat: [M3-7254] - Add AGLB Routes - Rule Edit Drawer#9778bnussman-akamai merged 7 commits intolinode:developfrom
Conversation
| backgroundColor: theme.bg.bgPaper, | ||
| }, | ||
| alignItems: 'center', | ||
| backgroundColor: theme.bg.bgPaper, |
| rule.match_condition.hostname ?? | ||
| `Rule ${rule.match_condition.hostname}` | ||
| } | ||
| aria-label={`Rule ${index}`} |
There was a problem hiding this comment.
Is this change okay for accessibility? Rules don't have a solid way to uniquely identify them so I think index is best here
There was a problem hiding this comment.
Since order matters and hostname isn't unique, then I think the change makes sense.
| > | ||
| {rule.match_condition | ||
| .session_stickiness_cookie && | ||
| .session_stickiness_cookie || |
There was a problem hiding this comment.
Fixes incorrect logic
There was a problem hiding this comment.
Overall, adding, editing, and reordering rules looks good. The drawer works in add and edit mode. The UI updates accordingly, populates the form with data in edit mode, and displays the updates in the table after the request is submitted.
A few questions (sorry if these have already been addressed in past PRs -- would appreciate a reminder):
Related directly to this PR:
- Is the API spec for the request payload for
PUT /v4beta/aglb/{id}/routes/{id}out of date? I noticed some slight discrepancies.
- API spec includes route
labelin the request; our request payload in Cloud does not. - API spec does not include service target
labelin the request; our payload in Cloud does.
Not directly related to this PR:
- Have we talked about expanding the width of this tooltip? It's a lot of text and a little hard to read with how thin it is.
- Should we add some logic to not display the tooltip on rules where there are no service targets? Currently, we display a blank tooltip popover, which is a little weird.
There was a problem hiding this comment.
Can we fix the typo in the helper text for TCP rules?
"A TCP rule consists a percent allocation to a Service Target." -> "A TCP rule consists of a percent allocation to a Service Target."
| rule.match_condition.hostname ?? | ||
| `Rule ${rule.match_condition.hostname}` | ||
| } | ||
| aria-label={`Rule ${index}`} |
There was a problem hiding this comment.
Since order matters and hostname isn't unique, then I think the change makes sense.
|
mjac0bs
left a comment
There was a problem hiding this comment.
@bnussman-akamai
Approving, pending the typo I mentioned is addressed and follow up tickets are created.
- We do have
labelin the PUT request type but we don't need it in the actual requets. All Linode API PUTs assume all fields are optional.
Oops, yeah, you're right!
You are correct about the fact service target should not have
labelas a type but I hesitate to fix it as part of this PR because it will add a significant amount of code.
That's fair and a good call about not wanting to expand the scope of this PR. Can we make a follow up ticket for this?
- I wanted to expand the tooltip but at the time of its creation it wasn't possible. @abailly-akamai said I should be able to widen it after feat: [M3-7114] - Allow user to choose resize migration type when resizing Linode #9677 but I don't think this is true because feat: [M3-7114] - Allow user to choose resize migration type when resizing Linode #9677 didn't touch the TextField component
Good context -- thank you for looking into and linking. I felt like this had been discussed before, but didn't remember exactly where. TBH, I don't understand how this styled component is working, but I see it in Storybook... a template literal tacked on after the styled function? Didn't know you could do that.
It looks like TextfField has a tooltipClasses prop and we've used that in the past to pass in a minWidth... but from what I can tell, it seems like this is not actually working on the label field Database Create form.
Anyway, this is minor and not worth holding up the PR over or expanding the scope too much. (Unless @jaalah-akamai can help do this cleanly.) A follow up ticket would be nice to address at some point in the future since it sounds like we're in consensus that wider is better.
- I'll see if I can add something for the empty state or just hide the tooltip
Empty state of "None" looks good now; thanks for the add.
cpathipa
left a comment
There was a problem hiding this comment.
Overall LGTM!
- Verified the functionality of editing a rule
- Verified add rule
- Verified re-order rules




Description 📝
Preview 📷
How to test 🧪
Prerequisites
Verification steps
http://localhost:3000/loadbalancers/0/routesAs an Author I have considered 🤔
Check all that apply