Commit Graph

53 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
Vadym Markov b6439399e0 Make word wrapping consistent
Proposed patch enables word wrapping for 'Image name' and 'Host' columns
in affected dashboards. Currently, all potentially long names like instance
and image name are wrapped. Ellipsis might be a good idea, but it is not
implemented. Patch [1] just turns off wrapping for instance size (which is
reasonable, it is short in most cases) and hostname (might be very long in
prod environment, because in some cases backend generate some random name
for compute VM)

[1] https://review.opendev.org/c/openstack/horizon/+/5831

Related-Bug: #964738
Change-Id: I3058825c0e4ae114fb397670dbed1c1c6e983552
2021-06-25 15:03:40 +03:00
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
2021-02-12 13:05:27 -06: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 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 53486be43f Define default settings explicitly (openstack_dashboard 2/5)
This commit mainly covers settings
in openstack_dashboard/dashboards/admin/.

Part of blueprint ini-based-configuration
Change-Id: Ifb3e9401a926ba9e035e1b498a4a4493c1b594f5
2019-04-24 02:32:47 +09:00
Akihiro Motoki c076db20c8 pylint: fix len-as-condition warning
Change-Id: Ib89c1854ad42b96e4caf281160d568fe98430afe
2019-01-16 12:56:20 +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 eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Trygve Vea 887d7fb847 Add network availability zone information for network agents
This patch adds the availability zone column for network agents on the system
information page, if either the router_availability_zone or the
network_availability_zone extension is enabled.

Change-Id: Id7509fab440383bff45cb8ce5bdc3f8eb62045f4
Closes-Bug: #1716638
2017-10-21 09:10:34 +00:00
Akihiro Motoki f54c52418b Do not try to show L3 agent action when enable_router is False
When enable_router settings is False, 'routers' panel is not
registered and URL resolver of L3 agent action in the network
agent table will result in a failure.
As a result, System Information panel cannot be displayed.

This commit adds a check whether the router panel is enabled or not.

Change-Id: I67aba79f61870b093d4c1d9c7527003704483d50
Closes-Bug: #1671785
2017-03-13 08:51:54 +00:00
eric 5934d83b04 Improve system info page
This change adds region info and all the url types,
and also removes enabled (which never did anything).

Change-Id: I7594d2b3d1e9826ec66bac379059171150155c4b
Closes-bug: #1497448
2016-05-26 15:52:38 +00:00
eric 25b1aa86fb Adding admin lookup of routers per l3 agent
This change allows admin users to find out which routers are
located on which neutron l3 agent.

Partially implements: blueprint admin-neutron-l3-agents

Change-Id: I078ba0a1e6545196c578c8e59d35720c499c301f
2016-05-13 02:14:37 +00:00
liyingjun 0a6d9ce827 Change column order for Orchestration Services table
The `Last Updated` and `State` column are not consistent with other
tables in system information, change order to make it consistent.

Change-Id: If21aed35afe9dc56754f4b1e7bbd57bbda9369f5
Closes-bug: #1520510
2015-12-01 05:25:30 +08:00
Kanagaraj Manickam d34fe26cf8 Add orchestration service status reporting
System Information panel is updated with new tab called
Orchestration Services to report the heat engines status.

Implements blueprint heat-engine-status-report

Change-Id: Ibb6985c74dfb0b23a5ef94febde127a673ab0e38
2015-02-25 00:23:36 +05:30
Jenkins afc549552e Merge "Translatable system information panel state/status" 2015-02-11 03:01:33 +00:00
liyingjun 31eb118235 Translatable system information panel state/status
On the Admin->System->System Information panel on the Compute Services
and Block Storage Services tabs Status and State are not translatable.

Change-Id: I127346bc5ecdf8d20bf2609d1b956c3ee03fbe2e
Closes-bug: #1416105
2015-02-10 09:31:22 +08:00
lin-hua-cheng 0cde6aa055 Move to hacking 0.10
Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

Per the release notes, H307, H803 and H904 has been removed.

Fix code issues with H238 and W292.

Change-Id: I747ebb64db5825bc70f1ae19c1c1f5ca2089c06d
2015-02-04 20:27:07 -08:00
Christian Berendt ac8d8fa1e9 Remove unused method get_stats
It looks like the method get_stats in dashboards.info.tables is not
used anywhere in Horizon. The referenced file "_stats.html" is also
not available in the Horizon repository.

Closes-Bug: #1410524

Change-Id: I140ca0d57e89b792b7f1ac989ef78f13766639f6
2015-01-13 22:11:56 +01:00
Sergio Cazzolato b2dd9ded59 Revert "Remove the update default quotas feature"
This reverts commit ed586a0355.

The quota_class subcommand in python-novaclient was used to set default
quota values so it shouldn't have been removed. As now it is being
restored, the defaults quota panel is being restored too.

Related mailing list thread on the topic:
http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html

Resolved merge conflicts by hand in:
openstack_dashboard/api/cinder.py
openstack_dashboard/dashboards/admin/info/tabs.py
openstack_dashboard/dashboards/admin/info/tests.py

Updated translatable segments to match refactors in
openstack_dashboard/dashboards/admin/defaults/workflows.py
openstack_dashboard/dashboards/admin/defaults/tables.py

Fixed most egregious post-merge styling errors in
openstack_dashboard/dashboards/admin/defaults/templates/defaults/index.html
(probably should have been separate, but I just couldn't let it out that way!)

Removed unrelated file that was allowed to be part of the original commit
doc/source/topics/settings.rst

Co-Authored-By: Doug Fish <drfish@us.ibm.com>
Change-Id: Ic4c4ecec843c7ea9afd0db36ce0eb15952da15b3
Partial-Bug: #1299517
2014-09-30 18:12:02 +09:00
Akihiro Motoki 4dc22ebde6 Replace pgettext with pgettext_lazy to display translated string
Change-Id: I574161a4ce5ef249375250c18fdccd72fdc63d5a
Closes-Bug: #1370326
2014-09-17 13:37:57 +09:00
Sam Betts d252ae9f23 Added new filter class for sub-service tables
The same filter class was being run on almost every system info table
despite them having different attributes which was causing horizon to
break. New filter class filters on the 'binary' attribute of the
cinder and nova sub-services.

Change-Id: Idc69a58ee4705280e44bc81bcd429c58da00e6f1
Closes-Bug: 1363250
2014-09-04 13:19:49 +01:00
lin-hua-cheng 0234642702 Translatable value for Status column for Services
Change-Id: I2b68d2c5ad43ef005590b1fe3658bbae0b14d00e
Closes-Bug: #1326152
2014-08-01 23:30:04 -07:00
Jenkins 5a057424a8 Merge "Fix Updated At label" 2014-07-02 05:09:55 +00:00
David Lyle e39bc05971 Making compute services status fields consistent
Other tabs in the system info view have status and state values
capitalized. Adding capitalization to make compute services tab
consistent.

Closes-Bug: #1324720

Change-Id: I1db8dca82e301c9393bf34a403cd4dfbd7021871
2014-06-30 10:21:51 -06:00
Doug Fish d8a8891a2d Fix Updated At label
Change the column labels on the Compute, Cinder, and Network system
info panels to Last Updated from Updated At.

Closes-Bug: #1324625
Change-Id: Ic69c63c39a9743184f3a9cfdc7fe9e9b97bc7e97
2014-06-23 20:36:18 +00:00
Jenkins 6c0ab78c17 Merge "Display cinder services in System Info" 2014-06-08 07:36:45 +00:00
Jenkins 6c78f8066e Merge "Change Column name from Enabled to Status" 2014-06-05 19:15:06 +00:00
Santiago Baldassin 03ed6e1ad1 Display cinder services in System Info
This change includes cinder services in the system info
panel so that users can check which are the cinder services
and their status

Implements: blueprint cinder-service-list
Co-Authored-By: Leandro Costantino <leandro.i.costantino@intel.com>
Change-Id: Ic3594621ff956ef5aa76fb6617b5339f56015248
2014-06-05 15:23:09 -03:00
Juan Manuel Olle 65205a3175 Change Column name from Enabled to Status
Cells could take values [Enabled, Disabled] and 'Status'
is a better column name than 'Enabled'

Change-Id: If34b57dec268bed71b867d74d2934d47125a30c3
Closes-Bug: #1325685
2014-06-03 15:41:58 -03:00
Christian Berendt 373b2a9438 added disabled reason to column status in listing of compute services
Change-Id: I14bf2489565fa772a9c6448d2f9e55b5fa287ce3
Closes-Bug: #1313703
2014-05-27 12:44:12 +02:00
liyingjun 93f593e9fb Fix translatable string for "Injected File Path Bytes"
Rename "Injected File Path Bytes" to "Length of Injected File Path"

Change-Id: I35c268e0568f032c2b7a40a2ec8cf4c576e0ea53
Closes-bug: 1258175
2014-04-14 22:22:13 +08:00
Akihiro Motoki ebf8a25eda Make "Gigabytes" quotas description more meaningful
"Gigabytes" quota entry comes from Cinder, but Horizon displays
quotas from various projects and "Gigabytes" is hard to understand.
This commit changes it to "Total Size of Volumes and Snapshots (GB)".
From the same reason, "Snapshots" is renamed to "Volume Snapshots".

LUKS Volume quotas are also renamed for consistency.

Change-Id: I7289783b75d324980c0ca80b71835ab602efc354
Closes-Bug: #1298934
2014-03-29 21:59:58 +09:00
Jenkins 9e9a41b4b9 Merge "Remove the update default quotas feature" 2014-03-28 04:28:11 +00:00
Sergio Cazzolato ed586a0355 Remove the update default quotas feature
The default quota panel has been moved to a tab in the system
info panel.
The update default quotas feature has been removed.
The cinder quota-class methods have been removed to keep consistency.
The test cases and the apis for nova and cinder have been modified
according the change.

This change is done to support the change:
I1110022d6f628d03aaf363da707f2d2ef1600437

Change-Id: I193c7209d9681b6d69afe0d996153ac86850d243
Closes-Bug: #1292589
2014-03-26 12:19:21 -03:00
Akihiro Motoki 3301ce762a Remove verbose_name from hidden fields
verbose_name is unnecessary for hidden field.
Some verbose_name does not have much meaning
(it is just a mirror of form field name), but
it is marked as translated and such strings
are difficult to translate. To address this,
this commit cleans up verbose_name of hidden fields.

Change-Id: I14fc242f90ce22abe5a0517b44968c2a98f97f48
Closes-Bug: #1291548
2014-03-13 17:56:30 +09:00
Facundo Farias ed1525bc91 Host aggregates panel.
On this panel, aggregates could be added, deleted and edited.
This patch takes the aggregates panel out of System Info and
puts it back in the main admin panel list, as now, aggregates
are not static information. The host can be associated to a
host aggregate on this panel as well.

Change-Id: I4ef2d87c33981db36d4ebd3de2f4841cdfa9dbfd
Closes-Bug: #1261932
Implements: blueprint manage-host-aggregates
Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Alejandro Paredes <alejandro.e.paredes@intel.com>
2014-03-04 15:25:32 +00:00
Radomir Dopieralski 028332da4a Remove #noqa from most common imports and add them to import_exceptions
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.

I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.

I also removed a few unused imports that were revealed in the process.

Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
2014-01-07 12:26:35 +01:00
liyingjun 0f2b8b606e Rename method get_hosts in admin/info/tables.py
There are 2 identical methods defined in admin/info/tables.py,
Rename get_hosts to get_zone_hosts and get_aggregate_hosts.

Change-Id: Ib3d115737400515c4b31178721609055a9658085
Closes-bug: #1262944
2013-11-26 01:10:21 +08:00
Paul Belanger 74117eb8b6 Gate on H102 Apache 2.0 license header not found for pep8
Now all files are properly licensed per OpenStack Hacking.

Change-Id: I223d983018568357197b0d9cf5dde12c135c53c9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-11-19 13:55:04 -05:00
lawrancejing d33f294ba9 Remove unused LOG
In some files, we import logging and define
LOG, but we never used it later, so i remove
those unused LOG and make horizon code clean.

Fixed: bug #1231761

Change-Id: I1ebf0098c647e7522f5f1a93cfece7a52bdc05c1
2013-09-28 23:57:13 -07:00
David Lyle b98076615f Fixes missed localization in network agents
Fixes: bug #1220317

Change-Id: Ib4d382759cbbe742ae2671edd33fe61f9a7648a1
2013-09-03 10:32:17 -06:00
Christian Berendt 240419544f added Network Agents to System Info panel
Added a new tab to the System Info panel showing all Network Agents.

fixes bug #1204375

Change-Id: I9c23105dde8528749275aba70065384dec354fb7
2013-09-03 14:03:08 +09:00
Tatiana Mazur 203faa535b "# noqa" cleanup
This patch set replaces a few method imports with
module imports instead of "# noqa" comments.

Fixes bug 1219676

Change-Id: I4d99ec5cda556669737c1eae2f528fbd35590d60
2013-09-02 15:23:44 +04:00
liyingjun 5f8e370f2d Allow admins to update default quotas
Add update default quotas form to edit the default quotas.

Move the editable default quotas tab to a new panel called
"Defaults".

Implements blueprint edit-default-quota

Change-Id: I6e3806226cd2f699f16b93c25e294bc67883738f
2013-08-29 23:18:08 +08:00
Tatiana Mazur 953d1b9793 Enable H302 check
This patch replaces some method imports with module imports and
makes H302 test enabled.

Fixes bug 1188531

Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
2013-08-22 17:39:09 +04:00
Gabriel Hurley c4ac732aa9 Adds availability zone info to System Info panel
Also moves the host aggregates data into System Info panel
because it's exactly the type of static information that
belongs there, and it reduces a significant amount of
boilerplate.

Incidentally adds a new table feature to make listing
out unordered lists of items easier.

Implements blueprint show-zone-for-admin

Change-Id: Id8fb5c9615b018135a5d90eaa82eb80ff63bb7dc
2013-08-19 23:13:10 -07:00
Christian Berendt 699926413c added Compute Services to System Info panel
Added a new tab to the System Info panel showing all Compute Services.

fixes bug #1198247

Change-Id: I7389652cff37a1282cff48c919ab36b645fbee88
2013-07-24 09:33:24 +02:00
Sergey Lukjanov 59ef565871 Enable H306 check
H306  imports not in alphabetical order

Change-Id: Ief2accac748248ebf46d4e49230662ff9b233053
2013-07-02 11:38:27 +04:00
Dirk Mueller e4ea445a5f Fix Further Pyflakes warnings
Fix occurences of F811 and F821.

Change-Id: I961e62e818ab846f7e1bbc1fdabfe8c051fd70eb
2013-06-26 09:16:28 +02:00