Commit Graph

10 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
pengyuesheng 9c04063c03 Add asterisk mark for the required field on CreateNamespaceForm
on Create Namespace Form in metadata defs panel,
the metadef_file and direct_input is not required,
but if we not input, an error was shown.

This patch Add asterisk mark for the required field

Change-Id: I796b1516b5ce95eebe0c7cb066460f1e21a07cc9
Closes-Bug: #1831197
2019-05-31 13:49:11 +08:00
Akihiro Motoki e9f75a7bcb pylint: fix useless-super-delegation warning
Change-Id: Iddea27e720dc7184fa3d524a2a465732f18d4dee
2019-01-16 13:05:09 +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
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00: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
Diana Whitten d0ddd223cb Horizon selects are now themable: Admin Panels
Horizon was using a standard select input. Unfortunately
this type of input is only customizable to a small extent.

Co-Authored-By: Matthew Wood <woodm1979@gmail.com>
Co-Authored-By: Brian Tully <brian.tully@hp.com>

Change-Id: Id86abbf5e8f0fd9b4a7bab05f5b56e6d0d82b778
Partially-implements: blueprint horizon-theme-css-reorg
2016-06-13 20:55:03 +00:00
zhu.rong 4636bf18d7 Delete the unused LOG configure code
Delete the unused LOG configure code and import code

Change-Id: I5e42a3b25aae89e62e20e8061b39c7be700aba33
2015-12-09 02:04:29 -05: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