Deprecate Django based Panel for Images, Keypair, and roles
As discussed in the horizon meetings or in horizon PTG sessions, horizon team agreed to deprecate django version of Images, Keypair and Roles panel as we think that feature gaps between the two implementations have been closed. Let's mark the Django version as deprecated for all these panels and gather more attention from operators. Change-Id: I965f9dbdd5e78b52a788f73b359c1c6fbc18637e
This commit is contained in:
parent
fcf3ae9365
commit
65d748fb25
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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"),),
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user