Skip to content

Commit 283a485

Browse files
authored
ui: fix create network access in deploy vm wizard (apache#9117)
Fixes apache#9115 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent ad66edf commit 283a485

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ui/public/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3029,7 +3029,8 @@
30293029
"message.network.offering.promiscuous.mode": "Applicable for guest Networks on VMware hypervisor only.\nReject - The switch drops any outbound frame from a virtual machine adapter with a source MAC address that is different from the one in the .vmx configuration file.\nAccept - The switch does not perform filtering, and permits all outbound frames.\nNone - Default to value from global setting.",
30303030
"message.network.removenic": "Please confirm that want to remove this NIC, which will also remove the associated Network from the Instance.",
30313031
"message.network.secondaryip": "Please confirm that you would like to acquire a new secondary IP for this NIC. \n NOTE: You need to manually configure the newly-acquired secondary IP inside the virtual machine.",
3032-
"message.network.selection": "Choose one or more Networks to attach the Instance to. A new Network can also be created here.",
3032+
"message.network.selection": "Choose one or more Networks to attach the Instance to.",
3033+
"message.network.selection.new.network": "A new Network can also be created here.",
30333034
"message.network.updateip": "Please confirm that you would like to change the IP address for this NIC on the Instance.",
30343035
"message.network.usage.info.data.points": "Each data point represents the difference in data traffic since the last data point.",
30353036
"message.network.usage.info.sum.of.vnics": "The Network usage shown is made up of the sum of data traffic from all the vNICs in the Instance.",

ui/src/views/compute/DeployVM.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
<template #description>
393393
<div v-if="zoneSelected" style="margin-top: 5px">
394394
<div style="margin-bottom: 10px">
395-
{{ $t('message.network.selection') }}
395+
{{ $t('message.network.selection') + ('createNetwork' in $store.getters.apis ? ' ' + $t('message.network.selection.new.network') : '') }}
396396
</div>
397397
<div v-if="vm.templateid && templateNics && templateNics.length > 0">
398398
<instance-nics-network-select-list-view

ui/src/views/compute/wizard/NetworkSelection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default {
254254
api('listZones', { id: this.zoneId }).then(json => {
255255
const zoneResponse = json.listzonesresponse.zone || []
256256
this.showCreateButton = false
257-
if (zoneResponse && zoneResponse.length > 0 && (!zoneResponse[0].securitygroupsenabled || (isAdmin() && zoneResponse[0].networktype === 'Advanced'))) {
257+
if ('createNetwork' in store.getters.apis && zoneResponse && zoneResponse.length > 0 && (!zoneResponse[0].securitygroupsenabled || (isAdmin() && zoneResponse[0].networktype === 'Advanced'))) {
258258
this.showCreateButton = true
259259
}
260260
})

0 commit comments

Comments
 (0)