This is an automated email from the ASF dual-hosted git repository.
harikrishna pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new 92e75932967 Use update offering APIs to disable compute and disk
offerings (#11550)
92e75932967 is described below
commit 92e75932967218240ceadd179996176fbca04694
Author: Harikrishna <[email protected]>
AuthorDate: Tue Sep 2 11:25:32 2025 +0530
Use update offering APIs to disable compute and disk offerings (#11550)
---
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
} }) }
}]