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
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
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
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
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
This commit mainly covers settings
in openstack_dashboard/dashboards/admin/.
Part of blueprint ini-based-configuration
Change-Id: Ifb3e9401a926ba9e035e1b498a4a4493c1b594f5
(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
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
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
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
This change adds region info and all the url types,
and also removes enabled (which never did anything).
Change-Id: I7594d2b3d1e9826ec66bac379059171150155c4b
Closes-bug: #1497448
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
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
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
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
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
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
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
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
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
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
Cells could take values [Enabled, Disabled] and 'Status'
is a better column name than 'Enabled'
Change-Id: If34b57dec268bed71b867d74d2934d47125a30c3
Closes-Bug: #1325685
"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
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
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
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>
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
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
Now all files are properly licensed per OpenStack Hacking.
Change-Id: I223d983018568357197b0d9cf5dde12c135c53c9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
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
This patch set replaces a few method imports with
module imports instead of "# noqa" comments.
Fixes bug 1219676
Change-Id: I4d99ec5cda556669737c1eae2f528fbd35590d60
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
This patch replaces some method imports with module imports and
makes H302 test enabled.
Fixes bug 1188531
Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
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