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
The 'Time since created' column name has been shortened to 'Age'
in project instances and admin instances meaning it fits properly
in table header cell and doesn't cause table header height to
increase.
Closes-Bug: #1614287
Change-Id: I94fc9eb260050e187445abd8236ac414b885b467
Co-Authored-By: Sam Wright <swright.wellington@gmail.com>
W503 line break before binary operator
Looking at the code base, it sounds okay to follow this check.
Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
(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
Admin can Rebulid and Shut off instance from instances in admin panel
for all project-member.
Change-Id: Ieab146b49a92f3527e34aacb0a9077a704151e3e
Closes-Bug: 1704833
We still can show instance info on admin/instances page even if tenant
is deleted or we can't retrieve tenant's information.
Change-Id: Idb1a5ffbb4103cce5258657d559bf4fe784b98d6
Closes-Bug: #1712565
At the current moment user can not suspend an
instance from the instance "Details" page if the
instance does not belong to the first page of the
instances list. This is fixed.
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Co-Authored-By: Vladislav Kuzmin <vkuzmin@mirantis.com>
Change-Id: I4d805e4a65e838242af38677cbb9efefc498a96f
Closes-Bug: #1553142
Updated the template used for LinkAction to add the css class for
destructive action if action_type is set to "danger".
Removed the action_type for live migration action because it is
not a destructive action.
Change-Id: Ib957597aa065df4c8a65303b1dc95a5c762ae3d3
Closes-bug: #1704014
* (admin/instances/tables.py)
_(" ") is confusing to translators. We already use an empty string ""
in the project instance table, so there is no need to use a string
only with a space.
* (project/instances/templates/instances/_detail_overview.html)
"Locked" in the instance detail template means an attribute name.
The word "locked" is potentially used in various contexts:
passive voice, adjective or some name like attribute name.
We can clarify the meaning of the string by using gettext context.
* (Angular workflow/launch-instance/keypair/create-keypair.html)
<label> with "translate" attribute leads to an extracted string
with HTML tagws. It can be avoided by using <translate> tag.
The fix is same as what were fixed in commit fcd30d95e8.
Change-Id: Ib30306d82e45d81188393d4965493abac93699e3
Added a column to show the locked status on project/admin instances table.
There will be a locked or unlocked icon with help tooltip if nova 2.9 or
above is used. See openstack_dashboard/api/microversions.py
Added the locked field on project/admin instance details panel.
Change-Id: If31ae281d2782c71cd6112f3bd6228647a6130e4
Closes-bug: #1593903
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
As Nova's API is unified to os_compute_api, the API policies are also
updated to use this format, Horizon needs to use Nova policy enforce
rules in the codebase. This patch also update nova_policy.json using
oslo-config-generator for Nova policy file.
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Implements: blueprint update-nova-enforce-policies
Change-Id: Id7d01a39930c88592301a5035f0befe5293a78fa
The action log under project dashboard should not link
to the user details panel which requires admin permission.
Change-Id: I802188db6f1f8fc7e854980eca85d3b1a75aec1e
Closes-bug: #1667154
Adds a word-break class that can be added to tables to prevent large
column values breaking the table shape.
Change-Id: Icca10d9c29254d176dc7f8b7c039bc19c3f52c72
Related-Bug: 1565724
Closes-Bug: 1584785
The column size is now sortable=False. Disables the sorting function
for this column in Admin-Instances, just as the table in
Project->Instances does.
Change-Id: I25fb0e2e5afb39d226cffcea611db961196c8809
Closes-bug: #1600329
A button should have either btn-default OR btn-danger ... not both.
This also removes the flashing red change this problem caused when
adding a 'disabled' class to the button after its already been
rendered on the page.
Closes-bug: #1557729
Closes-bug: #1549957
Change-Id: I6e035868be4df653438b4d31b462729c3fe06d9f
"Delete" is being used almost everywhere in OpenStack Dashboard
except the instance panel. Using "Delete" looks more consistent.
In addition, "Delete" tells non-native English speakers that
deleted instances will be no longer usable again compared to
"Terminate".
DocImpact
Closes-Bug: #1502773
Change-Id: Idccaf3c45566f20f11d02ada64c1d3934a6f3002
Are some filters text that not finalized with the symbol equals "="
(like in the majority).
This filters are in:
- Project --> Compute --> Instances ("Instance Name")
- Admin --> System --> Images ("Min. Size (MB)", "Max. Size (MB)")
- Admin --> System --> Instance ("Name")
Change-Id: I2ee0c51993349b227d3b2297ec5d6c556bacecf8
Closes-Bug: #1520997
Currently "Console" and "View Log" actions are referencing the Project
version of these pages instead of the Admin version.
i.e. "Console" action redirects to Project > Instances > Detail page
Additionally, the Admin instance detail page is using the collection
of actions from the Project instance table.
This change corrects these references to redirect to the detail page
under the Admin panel group; updates the Admin detail page to use the
collection of actions from the Admin instance table.
Change-Id: I7043d8283c4f3a85e52b360a790aa3487b9a4ff7
Closes-Bug: 1421318
Add appropriate help text to some important batch actions.
NOTE:
The another patch:
https://review.openstack.org/#/c/139920/
to add appropriate help text to some important delete actions.
Implements blueprint: add-batchactions-help-text
precondition blueprint: make-batchaction-help-text-configurable
Change-Id: Ide21a4fbcb327ed7edfc98f3e36b54aa527e0084
The size columns are not consistent in admin or project.
This patch make size columns be text wrapped in admin.
Change-Id: I4da6f230f5b17b53ecc8cc7cb201db363ba9bc07
Closes-Bug: #1415652
In admin's instance table, the filter with
'project' option filtering by exact matching
not by partial match.
the equal(=) symbol is missing at the end of the option.
there should be the = symbol to tell the user
it is doing exact match like other options.
in this patch the = symbol is added at the end of
the project option.
Change-Id: I2f81e4168d33d2dd34963039db85456a17cdbaf3
Closes-Bug: #1413534
Add shelved:True to instance status mapping to disable progress
bar when a instance is shelved.
Change-Id: Iad5cdce74bce829b11a902f13a774a008c3c425c
Closes-bug: #1406441
The Task state None is currently not translated because it is the
literal value None. Update to make sure it gets displayed as translated.
Also add in other missing task_states: 'reboot_pending', 'reboot_started',
'reboot_pending_hard', 'reboot_started_hard'
Change-Id: I4f9f8d22711896b2e9d39ef1bf5e803ca7bcbc0a
Closes-Bug: #1392848
Add missing reference to make the admin instances power state column
translatable. Note that this improves the i18n behavior without requiring any
new translations.
Change-Id: I1a1a7640cb2a9efdf084227d325ad03a28fca6f9
Closes-Bug: #1392834
Non-API bound filters were not persisting across pages changes,
this patch adds an additional check to make sure the DataTable looks
for any non api bound filters in the session and applies them on page load.
Also added some logic to make Project filter in Admin->Instances API
bound using the tenant_id.
Change-Id: Ieab9f2b92b59401809725a4f37628757dc4c8f13
Closes-Bug: 1369014
action_present/past methods were introduced in BatchAction to allow
translators to control word orders and plural forms. This patch
replaces the remaining old attribute version of action_present/past
with the method version.
Change-Id: I9f1cc8ff862471f33a5cb40f9e210c5222b7fb94
Partial-Bug: #1307476
Fix adds a mixin to replace the replicated get_policy_target
function. Duplicated code is removed from many classes and mixin is
inherited.
project_id, user_id and domain_id are now default in the generated
policy_target dict but are set to None if the data doesn't support it,
this is to provide the most flexibility for operators writing policy.json
as discussed in the bug report.
policy_target_attrs attribute added by the mixin is overwrittable by
sub-classes of the mixin to override the defaults for custom policy_target
information.
Change-Id: I26759f145b8756bd1eef585c8107160277061523
Closes-Bug: 1317238
If, any of the instances are shelved through CLI
those instances status are displayed as shelved offloaded
with a loading image.
Displaying the loading image for this status are not correct.
Displaying the loading image is removed for
the shelved offloaded status.
This problem is reported and fixed in #1318558 but this fix is
working only for rescue not for shelved offloaded.
Now it is fixed for shelved offloaded also.
Change-Id: I39d1e2fc1428923824b303f0837b25d736dc0e3c
Closes-Bug: #1352140
Co-Authored-By: Mizielski Robert <robert.mizielski@cloudwatt.com>
This adds the ability to filter paged tables (admin instances,
admin images, and project instances) based on supported API
query attributes.
Change-Id: I53cae922e3d349e2f01e8d0d688ddf04d65d84e4
Implements: blueprint table-filtering-by-api-query
Warnings H904, H307 and H405 are new or considerably changed, and will
be fixed in a separate patch.
Closes-bug: #1349820
Partial-bug: #1347472
Change-Id: I4fd28990dacf16f03a4eaa6074ef59c37f1a2c14
If, any of the instances are rescued or shelved through CLI
those instances status are displayed as rescue or shelved offloaded
with a loading image.
Displaying the loading image for this two status are not correct.
Displaying the loading image is removed for
the rescue and shelved offloaded status.
Change-Id: Ic29da8bc4a6bc75ae9269280f5b28e9ad6a63c2e
Closes-Bug: #1318558
Co-Authored-By: Mizielski Robert <robert.mizielski@cloudwatt.com>