Merge "Deprecate Django based Panel for Images, Keypair, and roles"
This commit is contained in:
commit
5ac974cf67
@ -44,6 +44,13 @@ ANGULAR_FEATURES
|
|||||||
|
|
||||||
.. versionadded:: 10.0.0(Newton)
|
.. 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:
|
Default:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
@ -32,10 +34,19 @@ from openstack_dashboard.dashboards.identity.roles \
|
|||||||
import tables as project_tables
|
import tables as project_tables
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
table_class = project_tables.RolesTable
|
table_class = project_tables.RolesTable
|
||||||
page_title = _("Roles")
|
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):
|
def needs_filter_first(self, table):
|
||||||
return self._needs_filter_first
|
return self._needs_filter_first
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
Views for managing Images and Snapshots.
|
Views for managing Images and Snapshots.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
@ -34,10 +36,19 @@ from openstack_dashboard.dashboards.project.images.images \
|
|||||||
import tables as images_tables
|
import tables as images_tables
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
table_class = images_tables.ImagesTable
|
table_class = images_tables.ImagesTable
|
||||||
page_title = _("Images")
|
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):
|
def has_prev_data(self, table):
|
||||||
return getattr(self, "_prev", False)
|
return getattr(self, "_prev", False)
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext_lazy as _
|
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
|
import tables as key_pairs_tables
|
||||||
from openstack_dashboard import policy
|
from openstack_dashboard import policy
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
table_class = key_pairs_tables.KeyPairsTable
|
table_class = key_pairs_tables.KeyPairsTable
|
||||||
page_title = _("Key Pairs")
|
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):
|
def get_data(self):
|
||||||
if not policy.check(
|
if not policy.check(
|
||||||
(("compute", "os_compute_api:os-keypairs:index"),),
|
(("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…
x
Reference in New Issue
Block a user