Commit Graph

13 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
Akihiro Motoki a8edb5059d pylint: fix simplifiable-if-statement/expression
Change-Id: I9af66f886c47d3d2be61cba22b6c84460a178b8e
2019-01-16 13:08:08 +09: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
Luis Daniel Castellanos 6fb02c5268 Update action for namespaces table public/protected attributes
With the inline edit deprecation the ability to edit the
public/protected attributes for a namespace was also removed.

This patch adds an update action to the namespaces table so users
can edit these attributes.

Change-Id: I7476b49a5bfe161c000046dfb5d622bfec924da7
Closes-Bug: #1617353
2016-09-07 15:56:24 -05:00
jlopezgu 7a88458acc Move get_filters to parent Class
For server side filtering the method get_filters() is used in every
view, moving this method to the parent class will allow us to not
add it to each view.

Implements blueprint: server-side-filtering

Change-Id: Idaee431ed15de81e5ea049948b55d1526e2024ac
2016-07-29 13:27:00 -05:00
Itxaka c6251d909e Metadata definitions table with pagination shows inconsistent data
When using the prev_marker, we ordered the list by desc and
then applied a sort based on the namespace but we used
reverse=True, making the list always being return in the
incorrect order.

Change-Id: If83bc51793a1c5064318770f976c13a0ca3adf62
Closes-Bug: 1560279
2016-06-30 14:11:36 +02:00
Kenji Ishii acf67e027d Change from client filter to server filter in metadata page
In metadata page, we can only filter within current page.
But it is not useful. So this patch will change to get filtered results
from server.
At the moment, glance is only providing 'Resource Types' as a filter key.

Change-Id: I96d4eee2cba2413725c5871062889c0c61e82593
Closes-Bug: #1586231
Partial-Implements: blueprint server-side-filtering
2016-06-15 09:52:46 +09:00
Diana Whitten 2e793aa2dd Branding: Workflow cancel btn should be themable
Cancel buttons are quite hard coded in their styles, and most templates
are overriding the default modal-footer template.

This patch removes most of the straight duplications in the
modal-footer.

Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Closes-bug: #1551455
Change-Id: I496381e3f512856ad37619108b45af3c1da800a5
2016-03-14 12:48:11 -07:00
Rob Cresswell f38ddf2032 Add breadcrumb to more details pages
This patch adds basic Breadcrumb nav to the detail pages for Data
Processing, Databases, Metadata Definitions and Routers.

Change-Id: I114e93799b957db39cbe0d4e49d3e6869bc9d92d
Partial-Bug: 1413823
2015-11-09 20:55:12 +00:00
Sam Betts 73ad5ec186 Reduce page title duplication in Admin views
Patch https://review.openstack.org/#/c/142802 adds a method of
reducing duplication of page title logic, this patch applies that change
to the admin info, instances, metering and metadata_defs views.

Change-Id: Ia30fee5318391283cb471a32547e75b1ecfb6de6
Partial-Bug: 1413749
2015-02-11 16:33:20 +00:00
Sam Betts 1934a7eaa8 Reduced code duplication in creating page headers
The same line of code to add a page title to a template was repeated in
many templates, this patch moves that line into the base.html, and also
tries to standardize the way page titles are defined in the python.

Change-Id: I11367d3007ebae727ba45446076a31307d477995
Closes-Bug: 1399840
2015-02-11 10:45:23 +00:00
Travis Tripp 7e5f4d1594 Base Glance Metadata Definitions Admin UI
Provide a base admin UI for viewing, importing, and associating the
metadata definitions that can be used with various resource types
such as flavors, images, and host aggregates.

In Juno, Glance provided a metadata definitions catalog[1][2] where
users can register the available metadata definitions that can be used
on different types of resources (images, artifacts, volumes, flavors,
aggregates, etc). This includes key / value pairs such as
properties, extra specs, etc. Horizon landed several patches that
read these properties. You can view the functionality in the
"update metadata" action on Flavors, Images, and Host Aggregates.

This specific patch is to bring in the Admin UI for the basic coarse
grained actions on the definitions in the catalog. This includes creating
(importing) a namespace, viewing the overview details about
it, deleting the namespace, and associating the namespace for use with
specific resource types.

Future blueprints will be registered for:
 - CRUD on individual metadata definitions within the namespace
For example, editing the default value of an individual property.

[1] Approved Glance Juno Spec:
https://github.com/openstack/glance-specs/blob/master/specs/juno/metadata-schema-catalog.rst

[2] Glance PTL Juno Feature Overview:
https://www.youtube.com/watch?v=3ptriiw1wK8&t=14m27s

Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Santiago Baldassin<santiago.b.baldassin@intel.com>
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
DocImpact: Concept awareness
Change-Id: Ie34007f73af7e0941631a52f03841068e509a72c
Implements: blueprint glance-metadata-definitions-base-admin-ui
2014-12-17 16:10:53 -07:00