This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 0535d9b5e1a ui: Add message upon network offering creation to warn
user of VR creation (#6684)
0535d9b5e1a is described below
commit 0535d9b5e1aa8449638ccb4c813233f3e521f195
Author: Bryan Lima <[email protected]>
AuthorDate: Sun Oct 9 06:51:41 2022 -0300
ui: Add message upon network offering creation to warn user of VR creation
(#6684)
This PR aims to improve the user experience upon creation of Network
Offerings warning the user of the scenarios in which a VR is created. For this,
the service offering field is always shown in the form and a warning message is
displayed if the user's configuration does not require the creation of a VR.
These scenarios include a network offering with guest type L2, and a with a
guest type Shared or Isolated when none of the following services are enabled:
(VPN, DHCP, DNS, Firewall, L [...]
---
ui/public/locales/en.json | 2 ++
ui/public/locales/pt_BR.json | 2 ++
ui/src/views/offering/AddNetworkOffering.vue | 8 +++++++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index 065528c210c..dce9040c33e 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -2650,6 +2650,8 @@
"message.volume.state.uploadinprogress": "Volume upload is in progress.",
"message.volume.state.uploadop": "The volume upload operation is in progress
or in short the volume is on secondary storage.",
"message.volume.state.primary.storage.suitability": "The suitability of a
primary storage for a volume depends on the disk offering of the volume and on
the virtual machine allocations if the volume is attached to a virtual
machine.",
+"message.vr.alert.upon.network.offering.creation.l2": "As virtual routers are
not created for L2 networks, the compute offering will not be used.",
+"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.",
"message.warn.filetype": "jpg, jpeg, png, bmp and svg are the only supported
image formats.",
"message.zone.creation.complete": "Zone creation complete.",
"message.zone.detail.description": "Populate zone details.",
diff --git a/ui/public/locales/pt_BR.json b/ui/public/locales/pt_BR.json
index 88972c5da10..d6b098d56ec 100644
--- a/ui/public/locales/pt_BR.json
+++ b/ui/public/locales/pt_BR.json
@@ -2462,6 +2462,8 @@
"message.volume.state.uploaderror": "O carregamento do volume encontrou um
erro",
"message.volume.state.uploadinprogress": "Carregamento do volume em progresso",
"message.volume.state.uploadop": "A opera\u00e7\u00e3o de carregamento de
volume est\u00e1 em andamento",
+"message.vr.alert.upon.network.offering.creation.l2": "Como VRs não são
criados para redes do tipo L2, a oferta de computação não será utilizada.",
+"message.vr.alert.upon.network.offering.creation.others": "Como nenhum dos
serviços obrigatórios para criação do VR (VPN, DHCP, DNS, Firewall, LB,
UserData, SourceNat, StaticNat, PortForwarding) foram habilitados, o VR não
será criado e a oferta de computação não será usada.",
"message.warn.filetype": "jpg, jpeg, png, bmp e svg s\u00e3o os \u00fanicos
formatos de imagem suportados",
"message.zone.creation.complete": "Cria\u00e7\u00e3o de zona completa",
"message.zone.detail.description": "Preencha os detalhes da zona",
diff --git a/ui/src/views/offering/AddNetworkOffering.vue
b/ui/src/views/offering/AddNetworkOffering.vue
index 0342fe72a0f..73e7ebade35 100644
--- a/ui/src/views/offering/AddNetworkOffering.vue
+++ b/ui/src/views/offering/AddNetworkOffering.vue
@@ -237,7 +237,13 @@
</a-radio-button>
</a-radio-group>
</a-form-item>
- <a-form-item v-if="isVirtualRouterForAtLeastOneService ||
isVpcVirtualRouterForAtLeastOneService">
+ <a-form-item>
+ <a-alert v-if="!isVirtualRouterForAtLeastOneService" type="warning"
style="margin-bottom: 10px">
+ <template #message>
+ <span v-if="guestType === 'l2'"
v-html="$t('message.vr.alert.upon.network.offering.creation.l2')" />
+ <span v-else
v-html="$t('message.vr.alert.upon.network.offering.creation.others')" />
+ </template>
+ </a-alert>
<template #label>
<tooltip-label :title="$t('label.serviceofferingid')"
:tooltip="apiParams.serviceofferingid.description"/>
</template>