UI: expose network ACL replacement from VPC tiers - #13794
Conversation
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13794 +/- ##
============================================
+ Coverage 19.65% 20.92% +1.27%
+ Complexity 19792 19791 -1
============================================
Files 6368 5881 -487
Lines 574881 533014 -41867
Branches 70351 62439 -7912
============================================
- Hits 112970 111537 -1433
+ Misses 449639 409403 -40236
+ Partials 12272 12074 -198
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Dogface2k |
|
UI build: ✔️ |
@weizhouapache there is now also a button in the vpc tiers overview list. I think that is fine as well. (edit: your sshot is from the tiers details page, this is extra) |
|
isolating VPC tier ACL replacement state |
|
Now you have me worried @Dogface2k . there is a lot of new code while the functionality was already there in a different place. Do we now have two implementations of the same function? |
Investigating it looks like we got duplicate stuff, agents went rouge in their new environments not sure why it continued to touch this PR xD My agents will return back to their main environments soon. Currently maxed out but over next few days will have full reasoning back and this duplicate shit won't happen it has pin pointed it and is rectifying it as we speak. Was always a risk setting up new environments. The constant auditing I have on every PR even when approved seem to of triggered another review that then led Two independent UI workflows and Duplicate form/API/polling logic @DaanHoogland |


Summary
Expose the existing
replaceNetworkACLListoperation directly from the VPC tiers overview.This is an additional UI entry point. The existing replace-ACL action on an individual tier's detail page remains unchanged.
Scope
replaceNetworkACLListAPIreplaceNetworkACLListis unavailable to the current userBehaviour
A replace-ACL action is shown beside the current ACL for each tier in the VPC tiers overview.
Selecting the action opens a dedicated replacement modal preselected with the tier's current ACL.
The replacement flow has its own:
It does not reuse or mutate the create-tier form state.
showReplaceAclModalremains the boolean modal-visibility state.handleOpenReplaceAclModal()starts a replacement interaction, captures the owning VPC identifier, initializes replacement-only state, and loads the ACL lists belonging to that VPC.handleCloseReplaceAclModal()handles user cancellation. It hides the modal, invalidates the cancelled interaction, and clears replacement-only state so a pending request cannot later update a closed or newer interaction.A validated submission hides the modal without invoking the cancellation handler, allowing the already captured operation to continue.
Each interaction is protected by its generation and owning VPC identifier. Closing the modal, opening another tier, or navigating to another VPC invalidates older ACL-list and validation completions.
This prevents stale asynchronous work from:
Before submission, the selected ACL, owning VPC, target tier, interaction generation, and form reference are captured for that operation.
The encoded request uses the existing API parameters:
aclid;networkid.An older submission completing after another replacement interaction has started continues to report its own captured tier identifier and cannot clear the newer interaction's loading state.
Successful asynchronous completion refreshes the VPC view through the existing
parentFetchDatacallback.The existing create-tier ACL-loading and selection path remains unchanged.
Validation
Focused tests in
VpcTiersTab.spec.jscover:data();aclidand capturednetworkid;The shallow-mounted component tests explicitly render stub default slots so the nested replacement form and overview action are present in the mounted template.
The current-head repository checks should be reviewed before merge.