Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion ui/src/views/offering/AddNetworkOffering.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Comment on lines +114 to +124
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
</a-row>
<a-row :gutter="12">
<a-col :md="12" :lg="12">
<a-form-item name="forvpc" ref="forvpc" v-if="guestType === 'isolated'">
Expand Down Expand Up @@ -703,7 +715,8 @@ export default {
isolation: 'dedicated',
conservemode: true,
availability: 'optional',
egressdefaultpolicy: 'deny',
specifyipranges: false,
egressdefaultpolicy: 'allow',
ispublic: this.isPublic,
nsxsupportlb: true,
routingmode: 'static'
Expand Down Expand Up @@ -1129,6 +1142,9 @@ export default {
if (values.specifyvlan === true) {
params.specifyvlan = true
}

params.specifyipranges = values.specifyipranges

Comment on lines 1142 to +1147
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
if (values.ispersistent) {
params.ispersistent = true
} else { // Isolated Network with Non-persistent network
Expand All @@ -1145,6 +1161,7 @@ export default {
}
// Conserve mode is irrelevant on L2 network offerings as there are no resources to conserve, do not pass it, true by default on server side
delete params.conservemode
delete params.specifyipranges
}

if (values.forvpc === true) {
Expand Down
Loading