|
312 | 312 | </a-radio-button> |
313 | 313 | </a-radio-group> |
314 | 314 | </a-form-item> |
315 | | - <a-form-item name="serviceofferingid" ref="serviceofferingid"> |
| 315 | + <a-form-item name="serviceofferingid" ref="serviceofferingid" v-if="guestType !== 'l2'"> |
316 | 316 | <a-alert v-if="!isVirtualRouterForAtLeastOneService" type="warning" style="margin-bottom: 10px"> |
317 | 317 | <template #message> |
318 | | - <span v-if="guestType === 'l2'" v-html="$t('message.vr.alert.upon.network.offering.creation.l2')" /> |
319 | | - <span v-else v-html="$t('message.vr.alert.upon.network.offering.creation.others')" /> |
| 318 | + <span v-html="$t('message.vr.alert.upon.network.offering.creation.others')" /> |
320 | 319 | </template> |
321 | 320 | </a-alert> |
322 | 321 | <template #label> |
|
331 | 330 | }" |
332 | 331 | :loading="serviceOfferingLoading" |
333 | 332 | :placeholder="apiParams.serviceofferingid.description"> |
334 | | - <a-select-option v-for="(opt) in serviceOfferings" :key="opt.id" :label="opt.name || opt.description"> |
335 | | - {{ opt.name || opt.description }} |
| 333 | + <a-select-option |
| 334 | + v-for="(offering, index) in serviceOfferings" |
| 335 | + :value="offering.id" |
| 336 | + :key="index"> |
| 337 | + {{ offering.displaytext || offering.name }} |
336 | 338 | </a-select-option> |
337 | 339 | </a-select> |
338 | 340 | </a-form-item> |
@@ -765,7 +767,6 @@ export default { |
765 | 767 | this.form.lbtype = 'publicLb' |
766 | 768 | this.isVirtualRouterForAtLeastOneService = false |
767 | 769 | this.isVpcVirtualRouterForAtLeastOneService = false |
768 | | - this.serviceOfferings = [] |
769 | 770 | this.serviceOfferingLoading = false |
770 | 771 | this.sourceNatServiceChecked = false |
771 | 772 | this.lbServiceChecked = false |
@@ -853,9 +854,7 @@ export default { |
853 | 854 | params.systemvmtype = 'domainrouter' |
854 | 855 | this.serviceOfferingLoading = true |
855 | 856 | api('listServiceOfferings', params).then(json => { |
856 | | - const listServiceOfferings = json.listserviceofferingsresponse.serviceoffering |
857 | | - this.serviceOfferings = this.serviceOfferings.concat(listServiceOfferings) |
858 | | - this.form.serviceofferingid = this.serviceOfferings.length > 0 ? this.serviceOfferings[0].id : '' |
| 857 | + this.serviceOfferings = json?.listserviceofferingsresponse?.serviceoffering || [] |
859 | 858 | }).finally(() => { |
860 | 859 | this.serviceOfferingLoading = false |
861 | 860 | }) |
|
0 commit comments