diff --git a/ui/src/locales/index.js b/ui/src/locales/index.js index d8ff08ff4a9..29c828b6447 100644 --- a/ui/src/locales/index.js +++ b/ui/src/locales/index.js @@ -26,7 +26,8 @@ export const i18n = createI18n({ fallbackLocale: 'en', silentTranslationWarn: true, messages: messages, - silentFallbackWarn: true + silentFallbackWarn: true, + warnHtmlInMessage: 'off' }) export function loadLanguageAsync (lang) { diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue index cbf48766997..5450db9aedd 100644 --- a/ui/src/views/infra/ClusterAdd.vue +++ b/ui/src/views/infra/ClusterAdd.vue @@ -269,10 +269,12 @@ export default { this.addCluster() }, addCluster () { + let clustername = this.clustername + if (this.hypervisor === 'VMware') { const clusternameVal = this.clustername this.url = `http://${this.host}/${this.dataCenter}/${clusternameVal}` - this.clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` + clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` } this.loading = true this.parentToggleLoading() @@ -281,7 +283,7 @@ export default { hypervisor: this.hypervisor, clustertype: this.clustertype, podId: this.podId, - clustername: this.clustername, + clustername: clustername, url: this.url } if (this.ovm3pool) { diff --git a/ui/src/views/infra/zone/ZoneWizardAddResources.vue b/ui/src/views/infra/zone/ZoneWizardAddResources.vue index ad16ef30aa1..bc19870776a 100644 --- a/ui/src/views/infra/zone/ZoneWizardAddResources.vue +++ b/ui/src/views/infra/zone/ZoneWizardAddResources.vue @@ -137,14 +137,14 @@ export default { return this.prefillContent?.hypervisor || null }, localstorageenabled () { - return this.prefillContent?.localstorageenabled?.value || false + return this.prefillContent?.localstorageenabled || false }, localstorageenabledforsystemvm () { - return this.prefillContent?.localstorageenabledforsystemvm?.value || false + return this.prefillContent?.localstorageenabledforsystemvm || false }, steps () { const steps = [] - const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor.value : null + const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor : null steps.push({ title: 'label.cluster', fromKey: 'clusterResource', diff --git a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue index 8d4b28144e5..5be870c7964 100644 --- a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue @@ -143,7 +143,7 @@ -
+
{{ $t('message.required.traffic.type') }}
{{ $t('label.cancel') }} @@ -161,7 +161,7 @@ 1 let isValid = true this.requiredTrafficTypes.forEach(type => { + if (!isValid) return false let foundType = false this.physicalNetworks.forEach(net => { net.traffics.forEach(traffic => { + if (!isValid) return false if (traffic.type === type) { foundType = true } - if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { - isValid = false + if (this.hypervisor !== 'VMware') { + if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { + isValid = false + } + } else { + if (shouldHaveLabels && (!traffic.vSwitchName || traffic.vSwitchName.length === 0)) { + isValid = false + } } }) }) @@ -477,12 +485,12 @@ export default { const fields = {} if (this.hypervisor === 'VMware') { delete this.trafficInEdit.traffic.label - fields.vSwitchName = null - fields.vlanId = null + fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || null + fields.vlanId = this.trafficInEdit?.traffic?.vlanId || null if (traffic.type === 'guest') { fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || 'vSwitch0' } - fields.vSwitchType = 'vmwaresvs' + fields.vSwitchType = this.trafficInEdit?.traffic?.vSwitchType || 'vmwaresvs' } else { delete this.trafficInEdit.traffic.vSwitchName delete this.trafficInEdit.traffic.vlanId