This is an automated email from the ASF dual-hosted git repository. harikrishna pushed a commit to branch useRightAPIs in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 485a5955398d005e5b7c5d1b6526ab03fb0bfcab Author: Harikrishna Patnala <harikrishna.patn...@gmail.com> AuthorDate: Mon Sep 1 17:05:49 2025 +0530 Use update offering APIs to disable compute and disk offerings --- ui/src/config/section/offering.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ui/src/config/section/offering.js b/ui/src/config/section/offering.js index 09a0919d860..2cef270ec3e 100644 --- a/ui/src/config/section/offering.js +++ b/ui/src/config/section/offering.js @@ -122,7 +122,7 @@ export default { show: (record) => { return record.state !== 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x, state: 'Active' } }) } }, { - api: 'deleteServiceOffering', + api: 'updateServiceOffering', icon: 'pause-circle-outlined', label: 'label.action.disable.service.offering', message: 'message.action.disable.service.offering', @@ -130,6 +130,11 @@ export default { dataView: true, groupAction: true, popup: true, + mapping: { + state: { + value: (record) => { return 'Inactive' } + } + }, show: (record) => { return record.state === 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x } }) } }] @@ -198,7 +203,7 @@ export default { show: (record) => { return record.state !== 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x, state: 'Active' } }) } }, { - api: 'deleteServiceOffering', + api: 'updateServiceOffering', icon: 'pause-circle-outlined', label: 'label.action.disable.system.service.offering', message: 'message.action.disable.system.service.offering', @@ -207,6 +212,11 @@ export default { params: { issystem: 'true' }, groupAction: true, popup: true, + mapping: { + state: { + value: (record) => { return 'Inactive' } + } + }, show: (record) => { return record.state === 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x } }) } }] @@ -301,7 +311,7 @@ export default { show: (record) => { return record.state !== 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x, state: 'Active' } }) } }, { - api: 'deleteDiskOffering', + api: 'updateDiskOffering', icon: 'pause-circle-outlined', label: 'label.action.disable.disk.offering', message: 'message.action.disable.disk.offering', @@ -309,6 +319,11 @@ export default { dataView: true, groupAction: true, popup: true, + mapping: { + state: { + value: (record) => { return 'Inactive' } + } + }, show: (record) => { return record.state === 'Active' }, groupMap: (selection) => { return selection.map(x => { return { id: x } }) } }]