You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ki...@apache.org on 2026/09/07 09:29:54 UTC
(cloudstack) branch main updated: Hide inactive offerings from User type accounts (#12865)
This is an automated email from the ASF dual-hosted git repository.
kiranchavala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 4875fdecf81 Hide inactive offerings from User type accounts (#12865)
4875fdecf81 is described below
commit 4875fdecf81f1104883bfacb54e56e1325db0b3a
Author: Erik Böck <89...@users.noreply.github.com>
AuthorDate: Mon Sep 7 06:29:48 2026 -0300
Hide inactive offerings from User type accounts (#12865)
* Hide inactive offerings from User type accounts
* Fix merge conflict
* Implement custom state query param handler in AutogenView
* Update ui/src/config/section/offering.js
Co-authored-by: Fabricio Duarte <fa...@gmail.com>
---------
Co-authored-by: Fabricio Duarte <fa...@gmail.com>
---
ui/src/config/section/offering.js | 12 ++++++++----
ui/src/views/AutogenView.vue | 4 ++++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/ui/src/config/section/offering.js b/ui/src/config/section/offering.js
index afdf2605a6a..f27b2eeb23e 100644
--- a/ui/src/config/section/offering.js
+++ b/ui/src/config/section/offering.js
@@ -32,13 +32,17 @@ export default {
permission: ['listServiceOfferings'],
searchFilters: ['name', 'gpuenabled', 'zoneid', 'domainid', 'cpunumber', 'cpuspeed', 'memory'],
params: () => {
- var params = {}
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
- params = { isrecursive: 'true' }
+ return { isrecursive: 'true' }
}
- return params
+ return { state: 'Active' }
+ },
+ filters: () => {
+ if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
+ return ['active', 'inactive']
+ }
+ return []
},
- filters: ['active', 'inactive'],
columns: ['name', 'displaytext', 'state', 'cpunumber', 'cpuspeed', 'memory', 'gpu', 'domain', 'zone', 'order'],
details: () => {
var fields = ['name', 'id', 'displaytext', 'offerha', 'provisioningtype', 'storagetype', 'iscustomized', 'iscustomizediops', 'limitcpuuse', 'cpunumber', 'cpuspeed', 'memory', 'hosttags', 'tags', 'storageaccessgroups', 'storagetags', 'domain', 'zone', 'created', 'dynamicscalingenabled', 'diskofferingstrictness', 'encryptroot', 'purgeresources', 'leaseduration', 'gpucardid', 'gpucardname', 'vgpuprofileid', 'vgpuprofilename', 'gpucount', 'gpudisplay', 'leaseexpiryaction', 'externald [...]
diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index 8b492d507a2..264ba0040af 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -1202,6 +1202,10 @@ export default {
delete params.listall
}
+ if (!['Admin', 'DomainAdmin'].includes(this.$store.getters.userInfo.roletype) && ['computeoffering'].includes(this.routeName)) {
+ delete params.state
+ }
+
callAPI(this.apiName, params).then(json => {
var responseName
var objectName