mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'origin/4.15' into main
This commit is contained in:
commit
6e8c114288
|
|
@ -1223,6 +1223,7 @@
|
|||
"label.latest.events": "Latest events",
|
||||
"label.launch": "Launch",
|
||||
"label.launch.vm": "Launch Virtual Machine",
|
||||
"label.launch.vm.and.stay": "Launch VM & Stay On This Page",
|
||||
"label.launch.zone": "Launch Zone",
|
||||
"label.lb.algorithm.leastconn": "Least connections",
|
||||
"label.lb.algorithm.roundrobin": "Round-robin",
|
||||
|
|
|
|||
|
|
@ -615,14 +615,27 @@
|
|||
</a-step>
|
||||
</a-steps>
|
||||
<div class="card-footer">
|
||||
<a-form-item>
|
||||
<a-switch
|
||||
class="form-item-hidden"
|
||||
v-decorator="['stayonpage']"
|
||||
></a-switch>
|
||||
</a-form-item>
|
||||
<!-- ToDo extract as component -->
|
||||
<a-button @click="() => this.$router.back()" :disabled="loading.deploy">
|
||||
{{ this.$t('label.cancel') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="handleSubmit" :loading="loading.deploy">
|
||||
<a-dropdown-button style="margin-left: 10px" type="primary" @click="handleSubmit" :loading="loading.deploy">
|
||||
<a-icon type="rocket" />
|
||||
{{ this.$t('label.launch.vm') }}
|
||||
</a-button>
|
||||
<a-icon slot="icon" type="down" />
|
||||
<a-menu type="primary" slot="overlay" @click="handleSubmitAndStay" theme="dark">
|
||||
<a-menu-item type="primary" key="1">
|
||||
<a-icon type="rocket" />
|
||||
{{ $t('label.launch.vm.and.stay') }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</a-card>
|
||||
|
|
@ -1407,6 +1420,15 @@ export default {
|
|||
getText (option) {
|
||||
return _.get(option, 'displaytext', _.get(option, 'name'))
|
||||
},
|
||||
handleSubmitAndStay (e) {
|
||||
this.form.setFieldsValue({
|
||||
stayonpage: true
|
||||
})
|
||||
this.handleSubmit(e.domEvent)
|
||||
this.form.setFieldsValue({
|
||||
stayonpage: false
|
||||
})
|
||||
},
|
||||
handleSubmit (e) {
|
||||
console.log('wizard submit')
|
||||
e.preventDefault()
|
||||
|
|
@ -1631,9 +1653,12 @@ export default {
|
|||
new Promise(resolve => setTimeout(resolve, 3000)).then(() => {
|
||||
eventBus.$emit('vm-refresh-data')
|
||||
})
|
||||
this.$router.back()
|
||||
if (!values.stayonpage) {
|
||||
this.$router.back()
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$notifyError(error)
|
||||
}).finally(() => {
|
||||
this.loading.deploy = false
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue