From 251361c790c640c74c9725b68354df56a1da69d4 Mon Sep 17 00:00:00 2001 From: Dajeong-Park Date: Thu, 21 May 2026 14:22:14 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=EB=94=94=EC=8A=A4=ED=81=AC/=EC=BB=B4?= =?UTF-8?q?=ED=93=A8=ED=8C=85=20=EC=98=A4=ED=8D=BC=EB=A7=81=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80/=EB=B3=B5=EC=A0=9C=20=EC=96=91=EC=8B=9D=20=ED=86=B5?= =?UTF-8?q?=ED=95=A9=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/offering/AddComputeOffering.vue | 706 +------------------ ui/src/views/offering/AddDiskOffering.vue | 415 +---------- 2 files changed, 58 insertions(+), 1063 deletions(-) diff --git a/ui/src/views/offering/AddComputeOffering.vue b/ui/src/views/offering/AddComputeOffering.vue index 2a687bb6500a..3a588fd76f8a 100644 --- a/ui/src/views/offering/AddComputeOffering.vue +++ b/ui/src/views/offering/AddComputeOffering.vue @@ -18,664 +18,22 @@ @@ -890,10 +248,8 @@ export default { }, fetchGPUCards () { this.gpuCardLoading = true - getAPI('listGpuCards', { - }).then(json => { + getAPI('listGpuCards', {}).then(json => { this.gpuCards = json.listgpucardsresponse.gpucard || [] - // Add a "None" option at the beginning this.gpuCards.unshift({ id: '', name: this.$t('label.none') @@ -909,7 +265,7 @@ export default { }).then(json => { this.diskOfferings = json.listdiskofferingsresponse.diskoffering || [] if (this.selectedDiskOfferingId === '') { - this.selectedDiskOfferingId = this.diskOfferings[0].id || '' + this.selectedDiskOfferingId = this.diskOfferings?.[0]?.id || '' } }).finally(() => { this.diskOfferingLoading = false @@ -985,7 +341,7 @@ export default { if (this.loading) return this.formRef.value.validate().then((values) => { - var params = { + const params = { issystem: this.isSystem, name: values.name, displaytext: values.displaytext, @@ -1048,7 +404,7 @@ export default { params.rootdisksize = values.rootdisksize } if (values.qostype === 'storage') { - var customIops = values.iscustomizeddiskiops === true + const customIops = values.iscustomizeddiskiops === true params.customizediops = customIops if (!customIops) { if (values.diskiopsmin != null && values.diskiopsmin.length > 0) { @@ -1077,8 +433,7 @@ export default { } } if (values.storagetags != null && values.storagetags.length > 0) { - var tags = values.storagetags.join(',') - params.tags = tags + params.tags = values.storagetags.join(',') } if (values.hosttags != null && values.hosttags.length > 0) { params.hosttags = values.hosttags @@ -1112,12 +467,12 @@ export default { } if (values.ispublic !== true) { - var domainIndexes = values.domainid - var domainId = null + const domainIndexes = values.domainid + let domainId = null if (domainIndexes && domainIndexes.length > 0) { - var domainIds = [] - for (var i = 0; i < domainIndexes.length; i++) { - domainIds = domainIds.concat(this.domains[domainIndexes[i]].id) + const domainIds = [] + for (let i = 0; i < domainIndexes.length; i++) { + domainIds.push(this.domains[domainIndexes[i]].id) } domainId = domainIds.join(',') } @@ -1125,12 +480,12 @@ export default { params.domainid = domainId } } - var zoneIndexes = values.zoneid - var zoneId = null + const zoneIndexes = values.zoneid + let zoneId = null if (zoneIndexes && zoneIndexes.length > 0) { - var zoneIds = [] - for (var j = 0; j < zoneIndexes.length; j++) { - zoneIds = zoneIds.concat(this.zones[zoneIndexes[j]].id) + const zoneIds = [] + for (let j = 0; j < zoneIndexes.length; j++) { + zoneIds.push(this.zones[zoneIndexes[j]].id) } zoneId = zoneIds.join(',') } @@ -1146,6 +501,7 @@ export default { }) } + this.loading = true postAPI('createServiceOffering', params).then(json => { const message = this.isSystem ? `${this.$t('message.create.service.offering')}: ` diff --git a/ui/src/views/offering/AddDiskOffering.vue b/ui/src/views/offering/AddDiskOffering.vue index 0ebbef18058b..d8978733770e 100644 --- a/ui/src/views/offering/AddDiskOffering.vue +++ b/ui/src/views/offering/AddDiskOffering.vue @@ -18,331 +18,33 @@