mirror of https://github.com/apache/cloudstack.git
Fixing loading of category in add and clone compute offering
This commit is contained in:
parent
ba7b6dc984
commit
716d823fbf
|
|
@ -686,7 +686,9 @@ export default {
|
|||
leaseexpiryaction: undefined,
|
||||
vgpuProfiles: [],
|
||||
vgpuProfileLoading: false,
|
||||
externalDetailsEnabled: false
|
||||
externalDetailsEnabled: false,
|
||||
categories: [],
|
||||
categoryLoading: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
|
@ -707,6 +709,7 @@ export default {
|
|||
this.fetchDomainData()
|
||||
this.fetchZoneData()
|
||||
this.fetchGPUCards()
|
||||
this.fetchCategories()
|
||||
if (isAdmin()) {
|
||||
this.fetchStorageTagData()
|
||||
this.fetchDeploymentPlannerData()
|
||||
|
|
@ -728,6 +731,14 @@ export default {
|
|||
this.gpuCardLoading = false
|
||||
})
|
||||
},
|
||||
fetchCategories () {
|
||||
this.categoryLoading = true
|
||||
getAPI('listServiceOfferingCategories', {}).then(json => {
|
||||
this.categories = json.listserviceofferingcategoriesresponse.serviceofferingcategory || []
|
||||
}).finally(() => {
|
||||
this.categoryLoading = false
|
||||
})
|
||||
},
|
||||
addDiskOffering () { this.showDiskOfferingModal = true },
|
||||
fetchDiskOfferings () {
|
||||
this.diskOfferingLoading = true
|
||||
|
|
|
|||
|
|
@ -140,7 +140,9 @@ export default {
|
|||
leaseexpiryaction: undefined,
|
||||
vgpuProfiles: [],
|
||||
vgpuProfileLoading: false,
|
||||
externalDetailsEnabled: false
|
||||
externalDetailsEnabled: false,
|
||||
categories: [],
|
||||
categoryLoading: false
|
||||
}
|
||||
},
|
||||
beforeCreate () {
|
||||
|
|
@ -252,6 +254,7 @@ export default {
|
|||
this.fetchDomainData()
|
||||
this.fetchZoneData()
|
||||
this.fetchGPUCards()
|
||||
this.fetchCategories()
|
||||
if (isAdmin()) {
|
||||
this.fetchStorageTagData()
|
||||
this.fetchDeploymentPlannerData()
|
||||
|
|
@ -397,6 +400,15 @@ export default {
|
|||
this.gpuCardLoading = false
|
||||
})
|
||||
},
|
||||
fetchCategories () {
|
||||
this.categoryLoading = true
|
||||
getAPI('listServiceOfferingCategories', {
|
||||
}).then(json => {
|
||||
this.categories = json.listserviceofferingcategoriesresponse.serviceofferingcategory || []
|
||||
}).finally(() => {
|
||||
this.categoryLoading = false
|
||||
})
|
||||
},
|
||||
fetchDiskOfferings () {
|
||||
this.diskOfferingLoading = true
|
||||
getAPI('listDiskOfferings', {
|
||||
|
|
@ -502,6 +514,10 @@ export default {
|
|||
params.diskofferingid = values.diskofferingid
|
||||
}
|
||||
|
||||
if (values.categoryid) {
|
||||
params.categoryid = values.categoryid
|
||||
}
|
||||
|
||||
if (values.vgpuprofile) {
|
||||
params.vgpuprofileid = values.vgpuprofile
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue