Skip to content

Commit 0957eab

Browse files
committed
ui: fix add management ip range form
Add management IP range form shows same pod multiple times when the pods has multiple IP ranges. This PR fixes the behaviour. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 2bbc781 commit 0957eab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ui/src/views/infra/network/IpRangesTabManagement.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
rules: [{ required: true, message: `${$t('label.required')}` }]
8787
}]"
8888
>
89-
<a-select-option v-for="item in items" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
89+
<a-select-option v-for="item in pods" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
9090
</a-select>
9191
</a-form-item>
9292
<a-form-item :label="$t('label.gateway')" class="form__item">
@@ -151,6 +151,7 @@ export default {
151151
return {
152152
componentLoading: false,
153153
items: [],
154+
pods: [],
154155
total: 0,
155156
domains: [],
156157
domainsLoading: false,
@@ -222,8 +223,8 @@ export default {
222223
}).then(response => {
223224
this.items = []
224225
this.total = response.listpodsresponse.count || 0
225-
const pods = response.listpodsresponse.pod ? response.listpodsresponse.pod : []
226-
for (const pod of pods) {
226+
this.pods = response.listpodsresponse.pod ? response.listpodsresponse.pod : []
227+
for (const pod of this.pods) {
227228
if (pod && pod.startip && pod.startip.length > 0) {
228229
for (var idx = 0; idx < pod.startip.length; idx++) {
229230
this.items.push({

0 commit comments

Comments
 (0)