7474 :prefillContent =" zoneConfig"
7575 />
7676 <zone-wizard-launch-zone
77- v-else
77+ v-else-if = " zoneSteps[currentStep].name === 'launch' "
7878 @backPressed =" backPressed"
79+ @nextPressed =" nextPressed"
80+ @fieldsChanged =" onFieldsChanged"
7981 @closeAction =" onCloseAction"
8082 @refresh-data =" onRefreshData"
8183 @stepError =" onStepError"
8587 :isFixError =" stepFixError"
8688 :prefillContent =" zoneConfig"
8789 />
90+
91+ <zone-wizard-register-template
92+ v-else-if =" zoneSteps[currentStep].name === 'registerTemplate'"
93+ :zoneid =" returnedZoneId"
94+ @closeAction =" onCloseAction"
95+ @refresh-data =" onRefreshData"
96+ />
8897 </div >
8998 </div >
9099</template >
@@ -95,6 +104,7 @@ import ZoneWizardCoreZoneTypeStep from '@views/infra/zone/ZoneWizardCoreZoneType
95104import ZoneWizardZoneDetailsStep from ' @views/infra/zone/ZoneWizardZoneDetailsStep'
96105import ZoneWizardNetworkSetupStep from ' @views/infra/zone/ZoneWizardNetworkSetupStep'
97106import ZoneWizardAddResources from ' @views/infra/zone/ZoneWizardAddResources'
107+ import ZoneWizardRegisterTemplate from ' @views/infra/zone/ZoneWizardRegisterTemplate'
98108import ZoneWizardLaunchZone from ' @views/infra/zone/ZoneWizardLaunchZone'
99109
100110export default {
@@ -103,6 +113,7 @@ export default {
103113 ZoneWizardCoreZoneTypeStep,
104114 ZoneWizardZoneDetailsStep,
105115 ZoneWizardNetworkSetupStep,
116+ ZoneWizardRegisterTemplate,
106117 ZoneWizardAddResources,
107118 ZoneWizardLaunchZone
108119 },
@@ -114,6 +125,13 @@ export default {
114125 launchZone: false ,
115126 launchData: {},
116127 stepChild: ' ' ,
128+ registerTemplateStep: {
129+ name: ' registerTemplate' ,
130+ title: ' label.register.template' ,
131+ step: [' registerTemplateAction' ],
132+ description: this .$t (' message.desc.register.template' ),
133+ hint: this .$t (' message.hint.register.template' )
134+ },
117135 coreZoneTypeStep: {
118136 name: ' coreType' ,
119137 title: ' label.core.zone.type' ,
@@ -158,7 +176,8 @@ export default {
158176 hint: this .$t (' message.launch.zone.hint' )
159177 }
160178 ],
161- zoneConfig: {}
179+ zoneConfig: {},
180+ returnedZoneId: null
162181 }
163182 },
164183 computed: {
@@ -167,6 +186,9 @@ export default {
167186 if (this .zoneConfig .zoneSuperType !== ' Edge' ) {
168187 steps .splice (1 , 0 , this .coreZoneTypeStep )
169188 }
189+ if (this .zoneConfig .hypervisor === ' KVM' ) {
190+ steps .splice (steps .length , 0 , this .registerTemplateStep )
191+ }
170192 return steps
171193 }
172194 },
@@ -201,6 +223,10 @@ export default {
201223 this .zoneConfig .physicalNetworks = null
202224 }
203225
226+ if (data .zoneReturned ) {
227+ this .returnedZoneId = data .zoneReturned .id
228+ }
229+
204230 this .zoneConfig = { ... this .zoneConfig , ... data }
205231 },
206232 onCloseAction () {
0 commit comments