Copilot commented on code in PR #12951:
URL: https://github.com/apache/cloudstack/pull/12951#discussion_r3031450126
##########
ui/src/views/offering/AddNetworkOffering.vue:
##########
@@ -111,6 +111,18 @@
</a-form-item>
</a-col>
</a-row>
+ <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>
Review 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.
##########
ui/src/views/offering/AddNetworkOffering.vue:
##########
@@ -1129,6 +1142,9 @@ export default {
if (values.specifyvlan === true) {
params.specifyvlan = true
}
+
+ params.specifyipranges = values.specifyipranges
+
Review 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]