From 2a166a5a02d878552aca454a8a89dad09938c673 Mon Sep 17 00:00:00 2001 From: "Gupta, Surya" Date: Thu, 17 Sep 2026 15:16:49 +0530 Subject: [PATCH] [CCS-5] Volume Resize Fix for IOPS and Size --- ui/src/views/storage/ResizeVolume.vue | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ui/src/views/storage/ResizeVolume.vue b/ui/src/views/storage/ResizeVolume.vue index 5f9efd6ed506..07b466f831eb 100644 --- a/ui/src/views/storage/ResizeVolume.vue +++ b/ui/src/views/storage/ResizeVolume.vue @@ -83,8 +83,6 @@ export default { }, data () { return { - offerings: [], - customDiskOffering: false, loading: false, customDiskOfferingIops: false } @@ -105,14 +103,23 @@ export default { }, fetchData () { this.loading = true + if (this.resource.size != null) { + this.form.size = Math.round(this.resource.size / (1024 * 1024 * 1024)) + } + if (!this.resource.diskofferingid) { + this.loading = false + return + } getAPI('listDiskOfferings', { - zoneid: this.resource.zoneid, - listall: true + id: this.resource.diskofferingid, + state: 'all' }).then(json => { - this.offerings = json.listdiskofferingsresponse.diskoffering || [] - this.form.diskofferingid = this.offerings[0].id || '' - this.customDiskOffering = this.offerings[0].iscustomized || false - this.customDiskOfferingIops = this.offerings[0].iscustomizediops || false + const currentOffering = (json.listdiskofferingsresponse.diskoffering || [])[0] + this.customDiskOfferingIops = currentOffering?.iscustomizediops || false + if (this.customDiskOfferingIops) { + this.form.miniops = this.resource.miniops + this.form.maxiops = this.resource.maxiops + } }).finally(() => { this.loading = false })