You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/09/11 10:17:15 UTC
[cloudstack-primate] branch master updated: deployvm: Fixing
instance groups (#685)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 1c26d40 deployvm: Fixing instance groups (#685)
1c26d40 is described below
commit 1c26d403709b37c8eab9b36d72991bf6b974959f
Author: davidjumani <dj...@gmail.com>
AuthorDate: Fri Sep 11 15:47:00 2020 +0530
deployvm: Fixing instance groups (#685)
---
src/views/compute/DeployVM.vue | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue
index 9bcdca4..7837be1 100644
--- a/src/views/compute/DeployVM.vue
+++ b/src/views/compute/DeployVM.vue
@@ -514,7 +514,10 @@
/>
</a-form-item>
<a-form-item :label="$t('label.group.optional')">
- <a-input v-decorator="['group']" />
+ <a-auto-complete
+ v-decorator="['group']"
+ :filterOption="filterOption"
+ :dataSource="options.instanceGroups" />
</a-form-item>
<a-form-item :label="$t('label.keyboard')">
<a-select
@@ -1147,6 +1150,7 @@ export default {
this.fetchBootTypes()
this.fetchBootModes()
+ this.fetchInstaceGroups()
Vue.nextTick().then(() => {
['name', 'keyboard', 'boottype', 'bootmode', 'userdata'].forEach(this.fillValue)
this.instanceConfig = this.form.getFieldsValue() // ToDo: maybe initialize with some other defaults
@@ -1202,6 +1206,19 @@ export default {
this.options.bootModes = bootModes
this.$forceUpdate()
},
+ fetchInstaceGroups () {
+ this.options.instanceGroups = []
+ api('listInstanceGroups', {
+ account: this.$store.getters.userInfo.account,
+ domainid: this.$store.getters.userInfo.domainid,
+ listall: true
+ }).then(response => {
+ const groups = response.listinstancegroupsresponse.instancegroup || []
+ groups.forEach(x => {
+ this.options.instanceGroups.push(x.name)
+ })
+ })
+ },
fetchNetwork () {
const param = this.params.networks
this.fetchOptions(param, 'networks')
@@ -1368,7 +1385,6 @@ export default {
deployVmData.podid = values.podid
deployVmData.clusterid = values.clusterid
deployVmData.hostid = values.hostid
- deployVmData.group = values.group
deployVmData.keyboard = values.keyboard
deployVmData.boottype = values.boottype
deployVmData.bootmode = values.bootmode
@@ -1463,6 +1479,9 @@ export default {
deployVmData.name = values.name
deployVmData.displayname = values.name
}
+ if (values.group) {
+ deployVmData.group = values.group
+ }
// step 8: enter setup
if ('properties' in values) {
const keys = Object.keys(values.properties)