From 837787b4047e3fc68cfe98ab3a075baa549c5dd7 Mon Sep 17 00:00:00 2001 From: Rafael Moyano Date: Thu, 10 Aug 2023 12:33:11 -0300 Subject: [PATCH] Add enabled condition for read-only address pools This condition will disable the address pools row dropdown menu for address pools created before bootstrap which are read-only and leave them enabled for address pools created post bootstrap which are not read-only. Test Plan: PASS: Build python-django-horizon package with these changes and install it in a system. Verify the changes are applied correctly. PASS: Build iso with these changes and perform a fresh install. Verify the changes are applied correctly. Partial-bug: 2030350 Change-Id: Ieb0397dda8b4c8bc249faf1fd99b8218432fdc51 Signed-off-by: Rafael Moyano --- ...ddress-pools-row-actions-as-disabled.patch | 49 +++++++++++++++++++ .../python-horizon/debian/patches/series | 1 + 2 files changed, 50 insertions(+) create mode 100644 openstack/python-horizon/debian/patches/0003-List-default-Address-pools-row-actions-as-disabled.patch diff --git a/openstack/python-horizon/debian/patches/0003-List-default-Address-pools-row-actions-as-disabled.patch b/openstack/python-horizon/debian/patches/0003-List-default-Address-pools-row-actions-as-disabled.patch new file mode 100644 index 00000000..870fa6ed --- /dev/null +++ b/openstack/python-horizon/debian/patches/0003-List-default-Address-pools-row-actions-as-disabled.patch @@ -0,0 +1,49 @@ +From 4d355d95b01d38d7a89bb8d15676f9541a532ef1 Mon Sep 17 00:00:00 2001 +From: Rafael Moyano +Date: Wed, 9 Aug 2023 18:05:10 -0300 +Subject: [PATCH 9222/9222] List default Address pools row actions as disabled + +Default address pools are read-only by design, any attempt to delete + or update them will fail. Default address pools row actions dropdown + menu has been disabled in order to prevent the unwanted behaviour. + +Test Plan: +PASS: Go to Admin > System Configuration > Address Pools. Create one +custom Address pool, save changes and wait until the address pools +list is updated properly. +PASS: Go to Admin > System Configuration > Address Pools. Select and +update custom Address pool, save changes and wait until the address +pools list is updated properly. +PASS: Go to Admin > System Configuration > Address Pools. Select and +delete custom Address pool, wait until the address pools list is +updated properly. +PASS: Go to Admin > System Configuration > Address Pools. Try to +update default Address pool, actions is not allowed. +PASS: Go to Admin > System Configuration > Address Pools. Try to +delete default Address pool using dropdown option, actions is not +allowed. + +Partial-bug: 2030350 + +Change-Id: I44f3b16ca483c95334b50ae5976b8330ce62bcde +Signed-off-by: Rafael Moyano +--- + .../horizon/common/_data_table_row_actions_dropdown.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html +index 9dbd07bcf..b152d1f3d 100644 +--- a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html ++++ b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html +@@ -9,7 +9,7 @@ + {% for action in row_actions %} + {% if forloop.first %} + {% include "horizon/common/_data_table_action.html" with is_small=1 is_single=1 %} +- ++ + + +