Improves the network offering creation form#12951
Improves the network offering creation form#12951Tonitzpp wants to merge 1 commit intoapache:mainfrom
Conversation
|
@bernardodemarco 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 #12951 +/- ##
============================================
+ Coverage 17.93% 18.00% +0.07%
- Complexity 16159 16458 +299
============================================
Files 5939 5977 +38
Lines 533147 537728 +4581
Branches 65237 66026 +789
============================================
+ Hits 95601 96817 +1216
- Misses 426804 429993 +3189
- Partials 10742 10918 +176
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
UI build: ✔️ |
There was a problem hiding this comment.
Pull request overview
This PR enhances the CloudStack UI network offering creation flow by exposing the specifyipranges API parameter in the form (for isolated guest networks) and aligning the UI default for egressdefaultpolicy with the API default (ALLOW).
Changes:
- Added a
specifyiprangesswitch to the “Add Network Offering” form for isolated guest type offerings. - Updated the form’s default
egressdefaultpolicyvalue fromdenytoallow. - Ensured
specifyiprangesis passed in request params where applicable and removed for L2 offerings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <a-row :gutter="12"> | ||
| <a-col :md="12" :lg="12"> | ||
| <a-form-item name="specifyipranges" ref="specifyipranges" v-if="guestType === 'isolated'"> | ||
| <template #label> | ||
| <tooltip-label :title="$t('label.specifyipranges')" :tooltip="apiParams.specifyipranges.description"/> | ||
| </template> | ||
| <a-switch v-model:checked="form.specifyipranges" /> | ||
| </a-form-item> | ||
| </a-col> | ||
| <a-col :md="12" :lg="12"> | ||
| </a-col> |
There was a problem hiding this comment.
The new specifyipranges row includes an empty <a-col> (md/lg=12) which adds unnecessary markup and can make the layout harder to maintain. Consider removing the empty column or changing the layout to a single full-width column for this row.
| if (values.specifyvlan === true) { | ||
| params.specifyvlan = true | ||
| } | ||
|
|
||
| params.specifyipranges = values.specifyipranges | ||
|
|
There was a problem hiding this comment.
specifyipranges will already be added to params by the generic keys.forEach loop (it’s not in ignoredKeys and boolean false passes the null/undefined checks). The additional params.specifyipranges = values.specifyipranges assignment in the isolated branch is therefore redundant; consider either adding specifyipranges to ignoredKeys and handling it only in the guest-type branches, or removing this extra assignment to avoid duplicate logic.
Description
Currently, when creating a new network offering through the CloudStack graphical interface it is not possible to specify the
specifyiprangesparameter. Furthermore, the default value of theegressdefaultpolicyfield isDENY, while the API's default isALLOW.This PR made modifications to add the
specifyiprangesfield to the form and change the default value ofegressdefaultpolicy.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
In the CloudStack graphical interface, I opened the create new network offering form and checked the new
specifyiprangesparameter was only in theIsolatedguest type and checked that the default value ofegressdefaultpolicyis nowAllow. After creating the new network offering, I created a new network and it was observed in the form that the fields to specify the IPs ranges were present.