Commit Graph

13 Commits

Author SHA1 Message Date
Akihiro Motoki d9266fd82c Address RemovedInDjango40Warning (3)
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path().

https://docs.djangoproject.com/en/4.0/releases/3.1/#id2

Change-Id: I484694f8718f61c022126a1935cf28fce075894b
2022-02-04 16:26:54 +09:00
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 ec970fd6e8 Handle partial dict setting
In Train cycle, we moved the definition of default values
to openstack_dashboard/defaults.py. The current code accesses
a dict member using []. It requires operators to define a dict
setting with a full member.

This commit allows to use dict-type settings with partial members.

A new function is introduced to retrieve a dict-type setting
considering default values defined in
{openstack_dashboard,horizon,openstack_auth}/defaults.py

Change-Id: I7ff0ad4bca698aef9c0eba370b0570200a14367a
Closes-Bug: #1843104
2019-09-26 14:31:17 +09:00
Akihiro Motoki af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
Yakup Adakli 124bbb3d82 AngularJS based panels page title updated
to more logical ones instead of "Horizon - OpenStack Dashboard".

Change-Id: Ia230ba28e011e99142e7fd2379fe1735ccd0b010
Closes-Bug: #1647855
2016-12-15 15:01:37 +03:00
Thai Tran 8c7c33381c Consolidated common angular view
We have views that references angular.html all over the dashboard.
This patch creates a single view for angular views and consolidate others.

Change-Id: I31bd7eb1ce9eac5ec4e13531679b12fc5ebbe60b
2016-11-17 12:07:16 -08:00
Rob Cresswell 1050755d05 Add ANGULAR_FEATURES setting dict
We should unify the angular features (new panels, workflows, etc.) in a
single setting. This also makes it a little cleaner to read, simply
using the 'truthiness' of a key rather than string comparisons.

I haven't moved the 'swift_panel' setting, as that panel will be removed
in the O cycle anway, so it seems pointless to move a setting causing
potential issues for a single cycle.

Change-Id: Ia5702ff523355ae895e14cc3d49c895128478944
2016-08-15 21:01:53 +00:00
Matt Borland 20bc6e1516 Make 'switch' between legacy and Angular Images
This patch follows on the example that the Containers set, providing
a 'switch' in the panel-enablement file that currently defaults to
'legacy' (Python-based Images panel) and allows for 'angular' (Angular-
based Images panel).

To be clear, this does NOT enable Angular Images.  It's just setting the
stage to do so at some point, or to allow deployers/devs to easily switch
between the two.

A switch both for HORIZON_CONFIG and for integration tests is necessary
due to the way integration tests operate.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I12cd33552218ed1082d2d9a2ae8982639a217a6a
Partially-Implements: blueprint angularize-images-table
2016-08-05 08:17:21 -06:00
Rob Cresswell 15e83c6448 Update URLs to Django 1.8+ style
Django 1.8 altered and deprecated the existing pattern for defining
URLs. This will be removed in 1.10, meaning that many deprecation
warnings show up under Django 1.9. We should fix the URLs promptly to
avoid logspam, and to support Django 1.10 in Newton.

See
https://docs.djangoproject.com/en/1.9/releases/1.8/#django-conf-urls-patterns

Change-Id: I074d20850de59bfe678a3bc72e9f0f25bd743cbf
Partially-Implements: blueprint dj110
2016-03-28 11:03:08 +01:00
Akihiro Motoki 2a9349bd67 Fix E128 errors in openstack_dashboard/dashboards/project/
E128 continuation line under-indented for visual indent

Partial-Bug: #1375929
Change-Id: I6bc8db7dab6fc2c3aad7fa54b6e07643b595f230
2014-10-16 16:53:52 +09:00
Tatiana Ovchinnikova 539c14e1c6 Remove #noqa from two common imports and add them to import_exceptions
We have two imports with #noqa: django.conf.urls.patterns and
django.conf.urls.url however using them is a standard way of creating
any urls.py module. So there are over 150 imports in Horizon code
where #noqa could be replaced with two lines in list of import_exceptions.

Change-Id: I81c3290e0dc958b5037dd6a87e44df18adfbe751
2014-09-16 14:08:28 +04:00
He Yongli e790ac070e Remove extraneous vim configuration comments
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2014-05-06 15:30:10 +08:00
Zhenguo Niu 3d25f1d595 Move volume snapshots table to volumes panel
Now that instance snapshots are just images, the images & snapshots
page only has images and volume snapshots. This is an odd combination.
I think we should now move volume snapshots to the volumes panel,
since a volume snapshot is tied to a volume.

Closes-Bug: #1190843
Change-Id: I3e12cec8b859a30db9f131e9889a92277e064086
2014-02-18 10:24:18 +08:00