mirror of https://github.com/apache/cloudstack.git
compute: VMware Bootintobios (#313)
UI implementation for apache/cloudstack#4021 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Co-authored-by: Daan Hoogland <dahn@onecht.net> Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com> Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
7f591e71ea
commit
2490b5d93e
|
|
@ -89,7 +89,18 @@ export default {
|
|||
dataView: true,
|
||||
groupAction: true,
|
||||
show: (record) => { return ['Stopped'].includes(record.state) },
|
||||
args: (record, store) => { return ['Admin'].includes(store.userInfo.roletype) ? ['podid', 'clusterid', 'hostid'] : [] },
|
||||
args: (record, store) => {
|
||||
var fields = []
|
||||
if (store.userInfo.roletype === 'Admin') {
|
||||
fields = ['podid', 'clusterid', 'hostid']
|
||||
}
|
||||
if (record.hypervisor === 'VMware') {
|
||||
if (store.apis.startVirtualMachine.params.filter(x => x.name === 'bootintosetup').length > 0) {
|
||||
fields.push('bootintosetup')
|
||||
}
|
||||
}
|
||||
return fields
|
||||
},
|
||||
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null }
|
||||
},
|
||||
{
|
||||
|
|
@ -109,7 +120,16 @@ export default {
|
|||
label: 'label.action.reboot.instance',
|
||||
message: 'message.action.reboot.instance',
|
||||
dataView: true,
|
||||
show: (record) => { return ['Running'].includes(record.state) }
|
||||
show: (record) => { return ['Running'].includes(record.state) },
|
||||
args: (record, store) => {
|
||||
var fields = []
|
||||
if (record.hypervisor === 'VMware') {
|
||||
if (store.apis.rebootVirtualMachine.params.filter(x => x.name === 'bootintosetup').length > 0) {
|
||||
fields.push('bootintosetup')
|
||||
}
|
||||
}
|
||||
return fields
|
||||
}
|
||||
},
|
||||
{
|
||||
api: 'restoreVirtualMachine',
|
||||
|
|
|
|||
|
|
@ -458,6 +458,7 @@
|
|||
"label.bladeid": "Blade ID",
|
||||
"label.blades": "Blades",
|
||||
"label.bootable": "Bootable",
|
||||
"label.bootintosetup": "Boot into hardware setup",
|
||||
"label.broadcastdomainrange": "Broadcast domain range",
|
||||
"label.broadcastdomaintype": "Broadcast Domain Type",
|
||||
"label.broadcasturi": "Broadcast URI",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import config from '@/config/settings'
|
||||
import router from '@/router'
|
||||
import store from '@/store'
|
||||
import { VueAxios } from './axios'
|
||||
import notification from 'ant-design-vue/es/notification'
|
||||
|
|
@ -53,7 +54,7 @@ const err = (error) => {
|
|||
}
|
||||
if (response.status === 404) {
|
||||
notification.error({ message: 'Not Found', description: 'Resource not found' })
|
||||
this.$router.push({ path: '/exception/404' })
|
||||
router.push({ path: '/exception/404' })
|
||||
}
|
||||
}
|
||||
if (error.isAxiosError && !error.response) {
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@
|
|||
@change="value => this.hypervisor = value" />
|
||||
</a-form-item>
|
||||
</p>
|
||||
<a-form-item :label="this.$t('label.bootintosetup')" v-if="zoneSelected && ((tabKey === 'isoid' && hypervisor === 'VMware') || (tabKey === 'templateid' && template && template.hypervisor === 'VMware'))" >
|
||||
<a-switch
|
||||
v-decorator="['bootintosetup']">
|
||||
</a-switch>
|
||||
</a-form-item>
|
||||
</a-card>
|
||||
<a-form-item class="form-item-hidden">
|
||||
<a-input v-decorator="['templateid']"/>
|
||||
|
|
@ -416,7 +421,8 @@ export default {
|
|||
DISK_OFFERING: 3,
|
||||
AFFINITY_GROUP: 4,
|
||||
NETWORK: 5,
|
||||
SSH_KEY_PAIR: 6
|
||||
SSH_KEY_PAIR: 6,
|
||||
ENABLE_SETUP: 7
|
||||
},
|
||||
initDataConfig: {},
|
||||
defaultNetwork: '',
|
||||
|
|
@ -946,6 +952,10 @@ export default {
|
|||
deployVmData.keypair = values.keypair
|
||||
deployVmData.name = values.name
|
||||
deployVmData.displayname = values.name
|
||||
// step 8: enter setup
|
||||
if ('bootintosetup' in values) {
|
||||
deployVmData.bootintosetup = values.bootintosetup
|
||||
}
|
||||
const title = this.$t('label.launch.vm')
|
||||
const description = values.name || ''
|
||||
const password = this.$t('label.password')
|
||||
|
|
|
|||
Loading…
Reference in New Issue