Skip to content

Commit eab37ec

Browse files
lucas-a-martinsLucas Martinsbernardodemarco
authored
Change L2 network offering form to not require a compute offering (#10389)
* Change L2 offering form to not require a compute offering * apply bernado's suggestion Co-authored-by: Bernardo De Marco Gonçalves <[email protected]> --------- Co-authored-by: Lucas Martins <[email protected]> Co-authored-by: Bernardo De Marco Gonçalves <[email protected]>
1 parent 69cf299 commit eab37ec

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

ui/public/locales/el_GR.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,6 @@
26892689
"message.volume.state.uploaderror": "Η αποστολή τόμου αντιμετώπισε κάποιο σφάλμα",
26902690
"message.volume.state.uploadinprogress": "Η αποστολή τόμου βρίσκεται σε εξέλιξη",
26912691
"message.volume.state.uploadop": "Η λειτουργία αποστολής τόμου βρίσκεται σε εξέλιξη ή, εν ολίγοις, ο τόμος βρίσκεται σε δευτερεύουσα αποθήκευση",
2692-
"message.vr.alert.upon.network.offering.creation.l2": "Επειδή εικονικοί δρομολογητές δεν χρησιμοποιούνται για δίκτυα L2 η προσφορά υπολογιστικού νέφους δεν θα χρησιμοποιηθεί",
26932692
"message.vr.alert.upon.network.offering.creation.others": "Εφόσον καμία απο τις υποχρεωτικές υπηρεσίες για την δημιουργία του εικονικού δρομολογητή (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat, PortForwarding) δεν είναι ενεργή, ο εικονικός δρομολογητές δεν θα δημιουργθεί και η προσφορά υπολογιστικού νέςφους δεν θα χρησιμοποιηθεί.",
26942693
"message.warn.filetype": "jpg, jpeg, png, bmp και svg είναι οι μόνες υποστηριζόμενες μορφές εικόνας.",
26952694
"message.zone.creation.complete": "Η δημιουργία ζώνης ολοκληρώθηκε",

ui/public/locales/en.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,6 @@
37113711
"message.volumes.managed": "Volumes controlled by CloudStack.",
37123712
"message.volumes.unmanaged": "Volumes not controlled by CloudStack.",
37133713
"message.vpc.restart.required": "Restart is required for VPC(s). Click here to view VPC(s) which require restart.",
3714-
"message.vr.alert.upon.network.offering.creation.l2": "As virtual routers are not created for L2 Networks, the compute offering will not be used.",
37153714
"message.vr.alert.upon.network.offering.creation.others": "As none of the obligatory services for creating a virtual router (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat, PortForwarding) are enabled, the virtual router will not be created and the compute offering will not be used.",
37163715
"message.warn.change.primary.storage.scope": "This feature is tested and supported for the following configurations:<br>KVM - NFS/Ceph - DefaultPrimary<br>VMware - NFS - DefaultPrimary<br>*There might be extra steps involved to make it work for other configurations.",
37173716
"message.warn.filetype": "jpg, jpeg, png, bmp and svg are the only supported image formats.",

ui/public/locales/pt_BR.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,6 @@
25072507
"message.volume.state.uploaderror": "O carregamento do volume encontrou um erro",
25082508
"message.volume.state.uploadinprogress": "Carregamento do volume em progresso",
25092509
"message.volume.state.uploadop": "A opera\u00e7\u00e3o de carregamento de volume est\u00e1 em andamento",
2510-
"message.vr.alert.upon.network.offering.creation.l2": "Como VRs n\u00e3o s\u00e3o criados para redes do tipo L2, a oferta de computa\u00e7\u00e3o n\u00e3o ser\u00e1 utilizada.",
25112510
"message.vr.alert.upon.network.offering.creation.others": "Como nenhum dos servi\u00e7os obrigat\u00f3rios para cria\u00e7\u00e3o do VR (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat, PortForwarding) foram habilitados, o VR n\u00e3o ser\u00e1 criado e a oferta de computa\u00e7\u00e3o n\u00e3o ser\u00e1 usada.",
25122511
"message.warn.filetype": "jpg, jpeg, png, bmp e svg s\u00e3o os \u00fanicos formatos de imagem suportados",
25132512
"message.warn.importing.instance.without.nic": "AVISO: essa inst\u00e2ncia est\u00e1 sendo importada sem NICs e muitos recursos de rede n\u00e3o estar\u00e3o dispon\u00edveis. Considere criar uma NIC antes de importar via VCenter ou assim que a inst\u00e2ncia for importada.",

ui/public/locales/te.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3661,7 +3661,6 @@
36613661
"message.volumes.managed": "CloudStack ద్వారా నియంత్రించబడే వాల్యూమ్‌లు.",
36623662
"message.volumes.unmanaged": "CloudStack ద్వారా వాల్యూమ్‌లు నియంత్రించబడవు.",
36633663
"message.vpc.restart.required": "VPC(లు) కోసం పునఃప్రారంభించాల్సిన అవసరం ఉంది. ",
3664-
"message.vr.alert.upon.network.offering.creation.l2": "L2 నెట్‌వర్క్‌ల కోసం వర్చువల్ రూటర్‌లు సృష్టించబడనందున, కంప్యూట్ ఆఫర్ ఉపయోగించబడదు.",
36653664
"message.vr.alert.upon.network.offering.creation.others": "వర్చువల్ రూటర్‌ను (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat, PortForwarding) సృష్టించడం కోసం తప్పనిసరి సేవలు ఏవీ ప్రారంభించబడనందున, వర్చువల్ రూటర్ సృష్టించబడదు మరియు గణన సమర్పణ ఉపయోగించబడదు.",
36663665
"message.warn.change.primary.storage.scope": "ఈ ఫీచర్ క్రింది కాన్ఫిగరేషన్‌ల కోసం పరీక్షించబడింది మరియు మద్దతు ఇస్తుంది:<br>KVM - NFS/Ceph - డిఫాల్ట్ ప్రైమరీ<br>VMware - NFS - డిఫాల్ట్ ప్రైమరీ<br>*ఇతర కాన్ఫిగరేషన్‌ల కోసం ఇది పని చేయడానికి అదనపు దశలు ఉండవచ్చు.",
36673666
"message.warn.filetype": "jpg, jpeg, png, bmp మరియు svg మాత్రమే మద్దతు ఉన్న ఇమేజ్ ఫార్మాట్‌లు.",

ui/src/views/offering/AddNetworkOffering.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@
312312
</a-radio-button>
313313
</a-radio-group>
314314
</a-form-item>
315-
<a-form-item name="serviceofferingid" ref="serviceofferingid">
315+
<a-form-item name="serviceofferingid" ref="serviceofferingid" v-if="guestType !== 'l2'">
316316
<a-alert v-if="!isVirtualRouterForAtLeastOneService" type="warning" style="margin-bottom: 10px">
317317
<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')" />
320319
</template>
321320
</a-alert>
322321
<template #label>
@@ -331,8 +330,11 @@
331330
}"
332331
:loading="serviceOfferingLoading"
333332
: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 }}
336338
</a-select-option>
337339
</a-select>
338340
</a-form-item>
@@ -765,7 +767,6 @@ export default {
765767
this.form.lbtype = 'publicLb'
766768
this.isVirtualRouterForAtLeastOneService = false
767769
this.isVpcVirtualRouterForAtLeastOneService = false
768-
this.serviceOfferings = []
769770
this.serviceOfferingLoading = false
770771
this.sourceNatServiceChecked = false
771772
this.lbServiceChecked = false
@@ -853,9 +854,7 @@ export default {
853854
params.systemvmtype = 'domainrouter'
854855
this.serviceOfferingLoading = true
855856
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 || []
859858
}).finally(() => {
860859
this.serviceOfferingLoading = false
861860
})

0 commit comments

Comments
 (0)