-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix VPC network offerings listing in isolated network creation form #12645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2510,6 +2510,7 @@ | |||||
| "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.", | ||||||
| "message.warn.filetype": "jpg, jpeg, png, bmp e svg s\u00e3o os \u00fanicos formatos de imagem suportados", | ||||||
| "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.", | ||||||
| "message.warn.vpc.offerings": "Ofertas de VPC s\u00c3o exibidas somente caso a conta selecionada possua ao menos uma VPC.", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| "message.zone.creation.complete": "Cria\u00e7\u00e3o de zona completa", | ||||||
| "message.zone.detail.description": "Preencha os detalhes da zona", | ||||||
| "message.zone.detail.hint": "Uma zona \u00e9 a maior unidade organizacional no CloudStack, e normalmente corresponde a um \u00fanico datacenter. As zonas proporcionam isolamento f\u00edsico e redund\u00e2ncia. Uma zona consiste em um ou mais pods (cada um contendo hosts e servidores de armazenamento prim\u00e1rio) e um servidor de armazenamento secund\u00e1rio que \u00e9 compartilhado por todos os pods da zona.", | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -96,6 +96,11 @@ | |||||||||||
| {{ opt.displaytext || opt.name || opt.description }} | ||||||||||||
| </a-select-option> | ||||||||||||
| </a-select> | ||||||||||||
| <a-alert type="warning" v-if="!this.hasVPC"> | ||||||||||||
| <template #message> | ||||||||||||
| <span v-html="$t('message.warn.vpc.offerings')"/> | ||||||||||||
| </template> | ||||||||||||
| </a-alert> | ||||||||||||
| </a-form-item> | ||||||||||||
| <a-form-item ref="asnumber" name="asnumber" v-if="isASNumberRequired()"> | ||||||||||||
| <template #label> | ||||||||||||
|
|
@@ -369,7 +374,8 @@ export default { | |||||||||||
| setMTU: false, | ||||||||||||
| asNumberLoading: false, | ||||||||||||
| selectedAsNumber: 0, | ||||||||||||
| asNumbersZone: [] | ||||||||||||
| asNumbersZone: [], | ||||||||||||
| hasVPC: true | ||||||||||||
| } | ||||||||||||
| }, | ||||||||||||
| watch: { | ||||||||||||
|
|
@@ -515,13 +521,17 @@ export default { | |||||||||||
| if (this.vpc !== null) { // from VPC section | ||||||||||||
| this.fetchNetworkOfferingData(true) | ||||||||||||
| } else { // from guest network section | ||||||||||||
| var params = {} | ||||||||||||
| var params = { | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| account: this.owner.account, | ||||||||||||
| projectid: this.owner.projectid, | ||||||||||||
| domainid: this.owner.domainid | ||||||||||||
| } | ||||||||||||
| this.networkOfferingLoading = true | ||||||||||||
| if ('listVPCs' in this.$store.getters.apis) { | ||||||||||||
| api('listVPCs', params).then(json => { | ||||||||||||
| const listVPCs = json.listvpcsresponse.vpc | ||||||||||||
| var vpcAvailable = this.arrayHasItems(listVPCs) | ||||||||||||
| if (vpcAvailable === false) { | ||||||||||||
| this.hasVPC = this.arrayHasItems(listVPCs) | ||||||||||||
| if (this.hasVPC === false) { | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| this.fetchNetworkOfferingData(false) | ||||||||||||
| } else { | ||||||||||||
| this.fetchNetworkOfferingData() | ||||||||||||
|
Comment on lines
+534
to
537
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @erikbocks I did not dig in this code too deep, if these are not equivalente, you can just disregard this suggestion |
||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.