summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-06-04 07:25:36 +0000
committerGerrit Code Review <review@openstack.org>2022-06-04 07:25:36 +0000
commit5ac974cf67bc6da560396a9c9fc885790d1694f0 (patch)
tree1d3a7415acf2bd163c12311d5d821f332ce6b1c7
parent5d48d0c548b662268c0bb9929b6f08378abc8ef0 (diff)
parent65d748fb252aaa8b0946100bfa8a59bddaf8f720 (diff)
downloadhorizon-5ac974cf67bc6da560396a9c9fc885790d1694f0.tar.gz
Merge "Deprecate Django based Panel for Images, Keypair, and roles"
-rw-r--r--doc/source/configuration/settings.rst7
-rw-r--r--openstack_dashboard/dashboards/identity/roles/views.py11
-rw-r--r--openstack_dashboard/dashboards/project/images/views.py11
-rw-r--r--openstack_dashboard/dashboards/project/key_pairs/views.py10
-rw-r--r--releasenotes/notes/deprecate-django-panels-for-images-keyspairs-roles-36b9c234eef71b51.yaml12
5 files changed, 51 insertions, 0 deletions
diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst
index 7c84f656f..e2cbf0c6e 100644
--- a/doc/source/configuration/settings.rst
+++ b/doc/source/configuration/settings.rst
@@ -44,6 +44,13 @@ ANGULAR_FEATURES
.. versionadded:: 10.0.0(Newton)
+
+.. deprecated:: 22.2.0(Zed)
+ The Django version of the Images, Keypairs, and Roles panels are deprecated.
+ As a result, "images_panel", "key_pairs_panel" and "roles_panel" keys in
+ this setting are deprecated. Consider switching to the AngujarJS version
+ by setting corresponding entries to True (the default value).
+
Default:
.. code-block:: python
diff --git a/openstack_dashboard/dashboards/identity/roles/views.py b/openstack_dashboard/dashboards/identity/roles/views.py
index f66ff4612..c2270c785 100644
--- a/openstack_dashboard/dashboards/identity/roles/views.py
+++ b/openstack_dashboard/dashboards/identity/roles/views.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import logging
+
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
@@ -32,10 +34,19 @@ from openstack_dashboard.dashboards.identity.roles \
import tables as project_tables
+LOG = logging.getLogger(__name__)
+
+
class IndexView(tables.DataTableView):
table_class = project_tables.RolesTable
page_title = _("Roles")
+ def __init__(self):
+ super().__init__()
+ LOG.warning('The Django version of the Roles panel is deprecated '
+ 'since Zed release. Switch to the AngularJS version by '
+ 'setting "ANGULAR_FEATURES[\'roles_panel\'] = True".')
+
def needs_filter_first(self, table):
return self._needs_filter_first
diff --git a/openstack_dashboard/dashboards/project/images/views.py b/openstack_dashboard/dashboards/project/images/views.py
index a241caa56..43f50404c 100644
--- a/openstack_dashboard/dashboards/project/images/views.py
+++ b/openstack_dashboard/dashboards/project/images/views.py
@@ -21,6 +21,8 @@
Views for managing Images and Snapshots.
"""
+import logging
+
from django.utils.translation import gettext_lazy as _
from horizon import exceptions
@@ -34,10 +36,19 @@ from openstack_dashboard.dashboards.project.images.images \
import tables as images_tables
+LOG = logging.getLogger(__name__)
+
+
class IndexView(tables.DataTableView):
table_class = images_tables.ImagesTable
page_title = _("Images")
+ def __init__(self):
+ super().__init__()
+ LOG.warning('The Django version of the Images panel is deprecated '
+ 'since Zed release. Switch to the AngularJS version by '
+ 'setting "ANGULAR_FEATURES[\'images_panel\'] = True".')
+
def has_prev_data(self, table):
return getattr(self, "_prev", False)
diff --git a/openstack_dashboard/dashboards/project/key_pairs/views.py b/openstack_dashboard/dashboards/project/key_pairs/views.py
index cacf46710..9ed42ca29 100644
--- a/openstack_dashboard/dashboards/project/key_pairs/views.py
+++ b/openstack_dashboard/dashboards/project/key_pairs/views.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import logging
+
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
@@ -29,11 +31,19 @@ from openstack_dashboard.dashboards.project.key_pairs \
import tables as key_pairs_tables
from openstack_dashboard import policy
+LOG = logging.getLogger(__name__)
+
class IndexView(tables.DataTableView):
table_class = key_pairs_tables.KeyPairsTable
page_title = _("Key Pairs")
+ def __init__(self):
+ super().__init__()
+ LOG.warning('The Django version of the Key Pairs panel is deprecated '
+ 'since Zed release. Switch to the AngularJS version by '
+ 'setting "ANGULAR_FEATURES[\'key_pairs_panel\'] = True".')
+
def get_data(self):
if not policy.check(
(("compute", "os_compute_api:os-keypairs:index"),),
diff --git a/releasenotes/notes/deprecate-django-panels-for-images-keyspairs-roles-36b9c234eef71b51.yaml b/releasenotes/notes/deprecate-django-panels-for-images-keyspairs-roles-36b9c234eef71b51.yaml
new file mode 100644
index 000000000..013412891
--- /dev/null
+++ b/releasenotes/notes/deprecate-django-panels-for-images-keyspairs-roles-36b9c234eef71b51.yaml
@@ -0,0 +1,12 @@
+---
+deprecations:
+ - |
+ The Django version of the Images, Keypairs, and Roles panels
+ is deprecated now. Switch to the AngularJS version by setting
+ ``images_panel``, ``key_pairs_panel`` and ``roles_panel`` keys
+ in ``ANGULAR_FEATURES`` setting to ``True``
+ (or dropping these keys from ``ANGULAR_FEATURES`` setting).
+ The horizon team believes that feature gaps between Django and
+ AngularJS implementations have been closed for all these panels and
+ we can drop the Django version. If you see any feature gap, please
+ file a bug to horizon or contact the horizon team.