From 13078a7e56af1f1514306df00ece5e0c6aad4821 Mon Sep 17 00:00:00 2001 From: Layon Date: Sun, 22 Dec 2024 22:43:08 -0300 Subject: [PATCH 1/4] Show icon to changeOfferingForVolume for the other users --- ui/src/config/section/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index e0fa72dff8a0..1a127039cfdd 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -223,7 +223,7 @@ export default { label: 'label.change.offering.for.volume', args: ['id', 'diskofferingid', 'size', 'miniops', 'maxiops', 'automigrate'], dataView: true, - show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) }, + show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) || !!store.apis.changeOfferingForVolume) }, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/ChangeOfferingForVolume.vue'))) }, From 517f8a1c74a7d79cdd6cb9c2294efbe4993f3334 Mon Sep 17 00:00:00 2001 From: Layon <144072822+LayonRibeiro@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:42:59 -0300 Subject: [PATCH 2/4] Update ui/src/config/section/storage.js Co-authored-by: dahn --- ui/src/config/section/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 1a127039cfdd..1debf07be872 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -223,7 +223,7 @@ export default { label: 'label.change.offering.for.volume', args: ['id', 'diskofferingid', 'size', 'miniops', 'maxiops', 'automigrate'], dataView: true, - show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) || !!store.apis.changeOfferingForVolume) }, + show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) || store.apis.changeOfferingForVolume) }, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/ChangeOfferingForVolume.vue'))) }, From b8b21636ff7aeab83e6657c1e41d113701b1433f Mon Sep 17 00:00:00 2001 From: Layon Date: Fri, 27 Dec 2024 16:12:21 -0300 Subject: [PATCH 3/4] Removed admin role verification --- ui/src/config/section/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 1debf07be872..fd98755f195c 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -223,7 +223,7 @@ export default { label: 'label.change.offering.for.volume', args: ['id', 'diskofferingid', 'size', 'miniops', 'maxiops', 'automigrate'], dataView: true, - show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) || store.apis.changeOfferingForVolume) }, + show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && store.apis.changeOfferingForVolume }, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/ChangeOfferingForVolume.vue'))) }, From cd511c01803a3d55d431c577c159a5eb545352cb Mon Sep 17 00:00:00 2001 From: "layon.oliveira" Date: Fri, 24 Jan 2025 16:19:28 -0300 Subject: [PATCH 4/4] check update --- ui/src/config/section/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index fd98755f195c..4a3d773a60ba 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -223,7 +223,7 @@ export default { label: 'label.change.offering.for.volume', args: ['id', 'diskofferingid', 'size', 'miniops', 'maxiops', 'automigrate'], dataView: true, - show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) && store.apis.changeOfferingForVolume }, + show: (record, store) => { return ['Allocated', 'Ready'].includes(record.state) }, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/ChangeOfferingForVolume.vue'))) },