Commit Graph

14 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
manchandavishal f83324a52c Add Group and Group Snapshot colunm
This patch add "Group" column in Volume table and
"Group Snapshot" column in Volume snapshot table under
admin panel.

Change-Id: Ifa18c70be7d73b302e75ab451b1cd572d970b5c6
2019-03-18 08:22:59 +00:00
manchandavishal beedc4e729 Correcting the error messages of Volume Snapshot Table
Change-Id: I8d0e2879a9d2a76cf5173764035f690072a80c82
Closes-Bug: #1818791
2019-03-06 08:51:54 +00:00
manchandavishal b37abb1168 Fix: Volume Snapshot Table "Project' column info
This patch fixes Volume Snapshot table 'Project' column
info.

Change-Id: Ibc8288da55867b63fddbb2b763bfd61377b0e5ad
Closes-Bug: #1815859
2019-02-19 14:33:06 +00:00
Akihiro Motoki 59beb951a3 pylint: Fix consider-using-(dict|set)-comprehension
Change-Id: I81c694c17106c179a53326a12e78cfa899872970
2019-01-13 00:59:05 +09:00
Wangliangyu 9faf1cd109 Fix bug about snapshot pagination
Now, one page content will be changed after Clicking
"Next page" or "Prev page" to go back.

As we know, the order of the list could not be changed
at will, for one at the beginning or the end is a marker.
The marker is very importent for pagination.
So, this commit remove the sort of snapshots and reverse
the sort of the previous page ones.

Change-Id: I8d3d0cf4a1e6526bed3055b18741b1cf5d6166ff
Closes-Bug: #1804391
2018-11-23 17:12:46 +08:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
Jenkins 0ec208fcd8 Merge "Correct the admin snapshot detail row actions are inconsistent with the table" 2017-07-03 20:40:46 +00:00
wei.ying 69a1cc3117 Correct the admin snapshot detail row actions are inconsistent with the table
An availabe snapshot has three row actions in admin snapshots table,
but four row actions in its detail page. This inconsistency seems to be
due to the admin snapshot table inheriting the project.

Change-Id: I33e5d5c1e78d714f6792c5c23538f7f015d30b3c
Closes-Bug: #1678462
2017-06-26 19:53:59 +08:00
Vladislav Kuzmin bf0998f853 Fix Volume Snapshot tab pagination
horizon/templates/horizon/common/_data_table_pagination.html template
that responsible for pagination link uses
"has_prev_data" and "has_more_data" methods.
These methods available in "snapshots" object that return
the "openstack_dashboard.dashboards.project.snapshots.SnapshotView"
(and "openstack_dashboard.dashboards.admin.snapshots.SnapshotView")
views. In turn, these views inherits from
"horizon.tables.PagedTableMixin" and "horizon.tables.DataTableView".
If we look at the chain of inheritance of the "DataTableView" class
we can see the following inheritance
MultiTableMixin -> MultiTableView -> DataTableView.
Class MultiTableMixin has it own "has_prev_data"
and "has_more_data" methods that in always return "False"
and bacause of this pagination doesn't work.
In turn, class PagedTableMixin also has "has_prev_data"
and "has_more_data" methods. These method returns value from
self._has_prev_data and self._has_more_data that assigned
in the original view. Because of this pagination depends
on multiple inheritance in this case.

Do it for Admin and Project tab.

To test: set 'Items Per Page' in the UI Settings page to a low number.

Change-Id: I08ccc430dd0a5d425a15e824ee0906995b56a425
Closes-Bug: #1695052
2017-06-09 12:29:44 +04:00
wei.ying b9cc9fd414 Fix incorrect window title in admin snapshots and volume types
They all missing the correct title before "- OpenStack Dashboard"
since used the wrong variable.

Change-Id: Ic03ee11a4492ca2084078faef7dc1f0253b3b9eb
Closes-Bug: #1680840
2017-04-07 21:21:01 +08:00
Richard Jones e0b6936178 Refactor Volumes from tabbed panel to stand-alone
This edit unfortunately contains more changes than the others
because it effectively merges a bunch of files under
admin/volumes/*.py

Change-Id: I52f3444a92fc83982a95760673419b4b4d746ad3
Implements: blueprint reorganise-volumes
2017-03-09 18:43:05 +00:00
Richard Jones e89c377599 Move Admin Volume Snapshots out of tabbed panel
Change-Id: I8c569a0d0fa5e990524012cacee50f9a249aa5e1
Implements: blueprint reorganise-volumes
2017-03-09 13:47:31 +11:00