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/08/28 09:54:58 UTC
[cloudstack-primate] branch master updated: Fixing calling
templatefilter=all (#632)
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 0445fcc Fixing calling templatefilter=all (#632)
0445fcc is described below
commit 0445fcc018abea625d5ec2c8be39f7b2afa18f68
Author: davidjumani <dj...@gmail.com>
AuthorDate: Fri Aug 28 15:24:50 2020 +0530
Fixing calling templatefilter=all (#632)
Fixes #605
---
src/views/compute/DeployVM.vue | 36 +++++++-----------------------------
1 file changed, 7 insertions(+), 29 deletions(-)
diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue
index 78fbee1..3ab3814 100644
--- a/src/views/compute/DeployVM.vue
+++ b/src/views/compute/DeployVM.vue
@@ -1139,10 +1139,6 @@ export default {
this.templateLicenses = []
this.templateProperties = {}
this.updateTemplateParameters()
- if (t.deployasis === true && !t.details && (!this.template || t.id !== this.template.id)) {
- // Deploy as-is template without details detected, need to retrieve the template details
- this.fetchTemplateDetails(t)
- }
template = t
break
}
@@ -1484,23 +1480,6 @@ export default {
this.loading[name] = false
})
},
- fetchTemplateDetails (template) {
- api('listTemplates', {
- templateFilter: 'all',
- id: template.id,
- details: 'all'
- }).then(response => {
- if (response && response.listtemplatesresponse) {
- const items = response.listtemplatesresponse.template
- if (items && items.length > 0) {
- this.template.details = items[0].details
- this.updateTemplateParameters()
- }
- }
- }).catch(error => {
- this.$notifyError(error)
- })
- },
fetchTemplates (templateFilter, params) {
const args = Object.assign({}, params)
if (args.keyword || args.category !== templateFilter) {
@@ -1509,7 +1488,7 @@ export default {
}
args.zoneid = _.get(this.zone, 'id')
args.templatefilter = templateFilter
- args.details = 'min'
+ args.details = 'all'
return new Promise((resolve, reject) => {
api('listTemplates', args).then((response) => {
@@ -1728,13 +1707,12 @@ export default {
this.templateProperties = this.fetchTemplateProperties(this.template)
this.selectedTemplateConfiguration = {}
if (this.templateConfigurationExists) {
- setTimeout(() => {
- this.selectedTemplateConfiguration = this.templateConfigurations[0]
- if ('templateConfiguration' in this.form.fieldsStore.fieldsMeta) {
- this.updateFieldValue('templateConfiguration', this.selectedTemplateConfiguration.id)
- }
- this.updateComputeOffering(null) // reset as existing selection may be incompatible
- }, 500)
+ this.selectedTemplateConfiguration = this.templateConfigurations[0]
+ this.handleTemplateConfiguration()
+ if ('templateConfiguration' in this.form.fieldsStore.fieldsMeta) {
+ this.updateFieldValue('templateConfiguration', this.selectedTemplateConfiguration.id)
+ }
+ this.updateComputeOffering(null) // reset as existing selection may be incompatible
}
}
},