Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,7 @@
"label.filter.annotations.self": "Created by me",
"label.filterby": "Filter by",
"label.fingerprint": "FingerPrint",
"label.skip": "Skip",
"label.finish": "Finish",
"label.firewall": "Firewall",
"label.firewall.policy": "Firewall Policy",
Expand Down
30 changes: 28 additions & 2 deletions ui/src/views/infra/zone/ZoneWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@
:prefillContent="zoneConfig"
/>
<zone-wizard-launch-zone
v-else
v-else-if="zoneSteps[currentStep].name === 'launch'"
@backPressed="backPressed"
@nextPressed="nextPressed"
@fieldsChanged="onFieldsChanged"
@closeAction="onCloseAction"
@refresh-data="onRefreshData"
@stepError="onStepError"
Expand All @@ -85,6 +87,13 @@
:isFixError="stepFixError"
:prefillContent="zoneConfig"
/>

<zone-wizard-register-template
v-else-if="zoneSteps[currentStep].name === 'registerTemplate'"
:zoneid="returnedZoneId"
@closeAction="onCloseAction"
@refresh-data="onRefreshData"
/>
</div>
</div>
</template>
Expand All @@ -95,6 +104,7 @@ import ZoneWizardCoreZoneTypeStep from '@views/infra/zone/ZoneWizardCoreZoneType
import ZoneWizardZoneDetailsStep from '@views/infra/zone/ZoneWizardZoneDetailsStep'
import ZoneWizardNetworkSetupStep from '@views/infra/zone/ZoneWizardNetworkSetupStep'
import ZoneWizardAddResources from '@views/infra/zone/ZoneWizardAddResources'
import ZoneWizardRegisterTemplate from '@views/infra/zone/ZoneWizardRegisterTemplate'
import ZoneWizardLaunchZone from '@views/infra/zone/ZoneWizardLaunchZone'

export default {
Expand All @@ -103,6 +113,7 @@ export default {
ZoneWizardCoreZoneTypeStep,
ZoneWizardZoneDetailsStep,
ZoneWizardNetworkSetupStep,
ZoneWizardRegisterTemplate,
ZoneWizardAddResources,
ZoneWizardLaunchZone
},
Expand All @@ -114,6 +125,13 @@ export default {
launchZone: false,
launchData: {},
stepChild: '',
registerTemplateStep: {
name: 'registerTemplate',
title: 'label.register.template',
step: ['registerTemplateAction'],
description: this.$t('message.desc.register.template'),
hint: this.$t('message.hint.register.template')
},
coreZoneTypeStep: {
name: 'coreType',
title: 'label.core.zone.type',
Expand Down Expand Up @@ -158,7 +176,8 @@ export default {
hint: this.$t('message.launch.zone.hint')
}
],
zoneConfig: {}
zoneConfig: {},
returnedZoneId: null
}
},
computed: {
Expand All @@ -167,6 +186,9 @@ export default {
if (this.zoneConfig.zoneSuperType !== 'Edge') {
steps.splice(1, 0, this.coreZoneTypeStep)
}
if (this.zoneConfig.hypervisor === 'KVM') {
steps.splice(steps.length, 0, this.registerTemplateStep)
}
return steps
}
},
Expand Down Expand Up @@ -201,6 +223,10 @@ export default {
this.zoneConfig.physicalNetworks = null
}

if (data.zoneReturned) {
this.returnedZoneId = data.zoneReturned.id
}

this.zoneConfig = { ...this.zoneConfig, ...data }
},
onCloseAction () {
Expand Down
9 changes: 7 additions & 2 deletions ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,13 @@ export default {
await this.$message.success('Success')
this.loading = false
this.steps = []
this.$emit('closeAction')
this.$emit('refresh-data')
if (this.prefillContent.hypervisor === 'KVM') {
this.$emit('fieldsChanged', { zoneReturned: { id: this.stepData.zoneReturned.id } })
this.$emit('nextPressed')
} else {
this.$emit('closeAction')
this.$emit('refresh-data')
}
} catch (e) {
this.loading = false
await this.$notification.error({
Expand Down
Loading
Loading