Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/src/locales/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const i18n = createI18n({
fallbackLocale: 'en',
silentTranslationWarn: true,
messages: messages,
silentFallbackWarn: true
silentFallbackWarn: true,
warnHtmlInMessage: 'off'
})

export function loadLanguageAsync (lang) {
Expand Down
6 changes: 4 additions & 2 deletions ui/src/views/infra/ClusterAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/views/infra/zone/ZoneWizardAddResources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
26 changes: 17 additions & 9 deletions ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@
</a-button>
</div>
<a-modal
:visible="showError"
v-model:visible="showError"
:title="`${$t('label.error')}!`"
:maskClosable="false"
:closable="true"
:footer="null"
@cancel="() => { showError = false }"
centered
>
<div v-ctrl-enter="showError = false">
<div v-ctrl-enter="() => showError = false">
<span>{{ $t('message.required.traffic.type') }}</span>
<div :span="24" class="action-button">
<a-button @click="showError = false">{{ $t('label.cancel') }}</a-button>
Expand All @@ -161,7 +161,7 @@
</a-modal>
<a-modal
:title="$t('label.edit.traffic.type')"
:visible="showEditTraffic"
v-model:visible="showEditTraffic"
:closable="true"
:maskClosable="false"
centered
Expand Down Expand Up @@ -323,7 +323,7 @@ export default {
return traffics
},
hypervisor () {
return this.prefillContent.hypervisor?.value || null
return this.prefillContent.hypervisor || null
}
},
created () {
Expand Down Expand Up @@ -414,14 +414,22 @@ export default {
const shouldHaveLabels = this.physicalNetworks.length > 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
}
}
})
})
Expand Down Expand Up @@ -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
Expand Down