From 716d823fbf1d6db4589d02c83a5d3ca7f8dd2049 Mon Sep 17 00:00:00 2001 From: Landry JUGE Date: Wed, 18 Mar 2026 22:03:59 +0100 Subject: [PATCH] Fixing loading of category in add and clone compute offering --- .../offering/ComputeOfferingForm.vue | 13 ++++++++++++- ui/src/views/offering/CloneComputeOffering.vue | 18 +++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ui/src/components/offering/ComputeOfferingForm.vue b/ui/src/components/offering/ComputeOfferingForm.vue index af071fe7c5b..fef48037fa9 100644 --- a/ui/src/components/offering/ComputeOfferingForm.vue +++ b/ui/src/components/offering/ComputeOfferingForm.vue @@ -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 diff --git a/ui/src/views/offering/CloneComputeOffering.vue b/ui/src/views/offering/CloneComputeOffering.vue index 07ce8852add..8ed257fecf4 100644 --- a/ui/src/views/offering/CloneComputeOffering.vue +++ b/ui/src/views/offering/CloneComputeOffering.vue @@ -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 }