Commit Graph

4443 Commits

Author SHA1 Message Date
Takashi Kajinami bced896d37 Remove workaround for old django-pyscss
This reverts the change[1] made earlier to workaround the issue caused
by usage of vendored version of six library in the django-pyscss
library.

The django-pyscss library no longer imports the vendored version of
six, since 2.0.3[2].

[1] 39f28ad5ed
[2] 1499332e1d

Change-Id: I22802b75d6a8d8f35930709e89d64dd65982cef0
2024-02-02 03:23:43 +09:00
OpenStack Proposal Bot 28dd7e3310 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2aee7f3751eb1553793578c8762439571406e42b
2024-01-14 05:38:23 +00:00
OpenStack Proposal Bot 79c1d158e0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I86c8017b94a61ec9371a354491f8474da326379a
2023-11-21 02:50:11 +00:00
OpenStack Proposal Bot 732cb44d2c Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I868e6bf1707d5343520b87a71c1cfa31a7eba0fd
2023-10-26 04:49:00 +00:00
Thomas Goirand 8770753fcc Specify transform=repr in assertQuerysetEqual()
Previously "repr" was automatically applied to "qs" argument of
assertQuerysetEqual() and most horizon unittest behaviors assume it.
It was deprecated in Django 3.2 and removed in Django 4.1. We need to
specify transform=repr explicitly to use the existing behavior.

[1] https://docs.djangoproject.com/en/3.2/topics/testing/tools/#django.test.TransactionTestCase.assertQuerysetEqual

Closes-Bug: #2038474
Change-Id: Ie7c7e9a1efc492889639e25509c8e614268c1d26
2023-10-23 14:24:49 +09:00
Akihiro Motoki b893bcdee3 Make site_branding tag work with Django 4.0
A test for site_branding tag starts to fail with Django 4.0.
It seems to happen as settings.SITE_BRANDING is _("Horizon") and
a translation marker _() is no longer evaluated during rendering.

As a solution, this commit changes the implementation of
site_branding tag to use "simple_tag" method
as django.template.Library.simple_tag() [1] seems to handle
an i18n-ed string properly.

[1] https://docs.djangoproject.com/en/4.0/howto/custom-template-tags/#simple-tags

Closes-Bug: #1980214
Change-Id: I6fdfffbeef2b405da21289d37722e3f068e27fea
2023-10-16 08:40:20 +00:00
Zuul 7b9e8887c8 Merge "Fix test failures with Django 4.x" 2023-10-04 07:50:53 +00:00
OpenStack Proposal Bot 84ca532792 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If5451e91c531c4d6c8a3c260b65b56f68e8aae3e
2023-09-26 04:07:39 +00:00
Corey Bryant b5b22dd183 Fix test failures with Django 4.x
The wsgi.input environment variable is expected to be a stream.

Closes-Bug: #2034952
Change-Id: I602449245b30d5375251bd7138f538f28068a16a
2023-09-13 08:40:51 -04:00
Benjamin Lasseye cb74c8c08f Add TOTP support
This patch adds support for MFA TOTP on openstack dashboard.
A new configuration variable OPENSTACK_KEYSTONE_MFA_TOTP_ENABLED
was added false by default.
If enabled, users needing TOTP are prompted with a new form.
keystone doc: https://docs.openstack.org/keystone/latest/admin/auth-totp.html
Demonstration video : https://youtu.be/prDJJdFoMpM

Change-Id: I1047102a379c8a900a5e6840096bb671da4fd2ff
Blueprint: #totp-support
Closes-Bug: #2030477
2023-08-18 12:02:25 +00:00
Zuul 3be3878be3 Merge "Fix deprecated use of 'jQuery.fn.focus()' shorthand event" 2023-05-09 20:12:25 +00:00
Zuul a80ffceac4 Merge "Fix deprecated use of 'jQuery.fn.change()' shorthand event" 2023-05-09 19:09:48 +00:00
Zuul dc2a2fd577 Merge "Fix "jQuery.fn.click() event shorthand is deprecated" warning" 2023-05-09 16:53:57 +00:00
manchandavishal eafd2f41b7 Fix deprecated use of 'jQuery.fn.focus()' shorthand event
This patch changed the code to use the recommended .trigger("focus")
method instead of the deprecated .focus(). For more information
about this deprecation, please refer [1].

[1] https://api.jquery.com/focus-shorthand/

Change-Id: Ib743c2d5d01aa81d43b2d38efc01496b25f58b26
2023-05-09 17:20:27 +05:30
Zuul 72903daff9 Merge "Fix "jQuery.fn.submit() event shorthand is deprecated" warning" 2023-05-09 11:47:54 +00:00
manchandavishal ba47352a73 Fix deprecated use of 'jQuery.fn.change()' shorthand event
This patch changed the code to use the recommended .trigger("change")
method instead of the deprecated .change(). For more information
about this deprecation, please refer [1].

[1] https://api.jquery.com/change-shorthand/

Change-Id: I762485c979cc5032db9a080d97d74f4be6efbcaf
2023-05-09 16:23:55 +05:30
manchandavishal 24047b5056 Fix "jQuery.fn.click() event shorthand is deprecated" warning
This patch changed the code to use the recommended 'on()' method
instead of the deprecated shorthand event. For more information
about this deprecation, please refer [1].

[1] https://api.jquery.com/click/

Change-Id: I4118a241a9e588ddac8cd1863979a7c83d6f98ff
2023-05-09 15:40:29 +05:30
Zuul 2e690f03da Merge "Remove Description from Edit Image Metadata" 2023-05-04 11:42:18 +00:00
Zuul 2cd7093804 Merge "Fix deprecated use of 'jQuery.fn.change()' shorthand event" 2023-04-27 05:35:54 +00:00
Zuul da7173515d Merge "Fix deprecation warning for .removeAttr()" 2023-04-26 23:58:29 +00:00
Zuul ce6d55ddcf Merge "Fix deprecated use of 'jQuery.fn.blur()' shorthand event" 2023-04-26 16:55:38 +00:00
manchandavishal 6918015508 Fix deprecated use of 'jQuery.fn.change()' shorthand event
This patch changed the code to use the recommended 'on()' method
instead of the deprecated shorthand event. For more information
about this deprecation, please refer [1].

[1] https://api.jquery.com/change-shorthand/

Change-Id: Ia580ddf2ea5b0fba7feb400db759f59c0f5d958f
2023-04-26 19:43:42 +05:30
manchandavishal 0d6d2f1290 Fix "jQuery.fn.submit() event shorthand is deprecated" warning
This patch changed the code to use the recommended .trigger('submit')
instead of the deprecated shorthand event .submit(). For more
information about this deprecation, please refer [1]. I am getting
this warning while deleting the "Application Credentials" under
Identity dashboard.

[1] https://api.jquery.com/submit-shorthand/

Change-Id: Icd86ccd6ec7c7b0df0e25254751caa7bc0a5f8e1
2023-04-26 19:15:43 +05:30
Zuul 28ca4c270f Merge "Fix deprecation warning for jQuery.fn.keyup() event shorthand" 2023-04-26 09:52:42 +00:00
Zuul 66fa187586 Merge "Update deprecated jQuery functions" 2023-04-25 21:11:04 +00:00
Tatiana Ovchinnikova 283b38e4f1 Remove Description from Edit Image Metadata
Image description can be edited through Edit Image -> Image Detail,
however it also appears as a property in Edit Image -> Metadata when
the description is not empty. It's confusing to have it in two sections
of one dialog form, and moreover, the Image Detail field always
overwrites the Metadata field.

This patch removes Description from Edit Metadata.

Closes-Bug: #2017698

Change-Id: I041948b4b71f00894f03cc30cfa4592df4a100c3
2023-04-25 15:18:07 -05:00
Zuul c151d67c93 Merge "Fix Deprecated: jQuery.parseJSON() warning by updating to JSON.parse()" 2023-04-25 03:52:12 +00:00
Zuul 9607dfbba4 Merge "Update jQuery click event to remove deprecation warning" 2023-04-25 00:22:38 +00:00
Zuul 49d8d0ce75 Merge "Fix "jQuery.fn.mousedown() event shorthand is deprecated" warning" 2023-04-24 22:32:04 +00:00
Zuul 01e1e4a66c Merge "Fix deprecation warning for jQuery.fn.keydown() event shorthand" 2023-04-24 22:02:24 +00:00
Zuul 604ae7a0d0 Merge "Fix "jQuery.fn.submit() event shorthand is deprecated" warning" 2023-04-24 21:46:41 +00:00
manchandavishal d787bd947c Fix deprecated use of 'jQuery.fn.blur()' shorthand event
This patch changed the code to use the recommended .trigger('blur')
method instead of the deprecated shorthand event. For more
information about this deprecation, please refer [1].

You will get this depracation warning in
Identtity->Domains->Action->"Manage Members" popup.

[1] https://api.jquery.com/blur/

Change-Id: I8b8713c5b239b3b786abf40b9ddcf5bb9bb109ba
2023-04-24 16:28:33 +05:30
Zuul da57fea8e2 Merge "Disable form auto-complete on login form" 2023-04-21 18:10:36 +00:00
manchandavishal 2d6cdae146 Fix deprecation warning for .removeAttr()
This patch updates the code to use the .prop() function instead of
.removeAttr() which was causing a deprecation warning.
For more info. please refer[1].

[1] https://api.jquery.com/removeAttr/

Change-Id: If9e104530d8ac48ead1d29eecabc6831046bc048
2023-04-20 01:52:53 +05:30
manchandavishal c397560d0d Fix "jQuery.fn.mousedown() event shorthand is deprecated" warning
This patch replaced the deprecated mousedown() event shorthand
with on('mousedown', ...) as suggested by the jQuery documentation[1].
This change ensures compatibility with the latest version of jQuery
and resolves the deprecation warning.

[1] https://api.jquery.com/mousedown/#mousedown-handler.

Change-Id: I2ccba8236d5831f4c81b3f963b7dc54fb98d95b8
2023-04-19 21:56:16 +05:30
David Hill e4a13dbcde Disable form auto-complete on login form
Disable form auto-complete on login form with autocomplete="off" for
the email/password field.

Change-Id: Ie550eae36ece160d19186a404c0e688f2f6e785b
2023-04-13 17:08:51 -04:00
manchandavishal f51d5e513c Fix deprecation warning for jQuery.fn.keyup() event shorthand
This patch updates the code to use the .on() method instead of
the deprecated .keyup() event shorthand, which was causing a
deprecation warning. For more info. please refer[1].

[1] https://api.jquery.com/keyup/

Change-Id: Idda3c2f083e6f484dcc745d07ed2d46698b0718d
2023-04-13 01:31:53 +05:30
manchandavishal 4053aa49eb Fix deprecation warning for jQuery.fn.keydown() event shorthand
This patch updates the code to use the .on() method instead of
the deprecated .keydown() event shorthand, which was causing a
deprecation warning. For more info. please refer[1].

[1] https://api.jquery.com/keydown/

Change-Id: I00b7c85f940f4967026e5d397321d4d56f10b1aa
2023-04-13 00:49:30 +05:30
manchandavishal 6b0aa20179 Update jQuery click event to remove deprecation warning
The shorthand jQuery.fn.click() event has been deprecated in favor
of the on() method. This patch updates the code to use the on()
method instead to remove the deprecation warning. For more
information about the deprecation of jQuery.fn.click(),
please refer [1].

[1] https://api.jquery.com/click/

Change-Id: Ic44aaded8d0aaa70e38e46d4121dc3c825f3b831
2023-04-12 22:16:53 +05:30
manchandavishal cf158a213a Fix "jQuery.fn.submit() event shorthand is deprecated" warning
In horizon.forms.handle_submit(), replaced the shorthand .submit()
eventbinding with .on('submit', function ()) to avoid the deprecated
shorthand usage as suggested by the jQuery documentation[1].

[1] https://api.jquery.com/submit/

Change-Id: I1ddd89bd99510a981f2f3b6e198786890be22280
2023-04-11 00:12:52 +05:30
manchandavishal de61e2a049 Fix Deprecated: jQuery.parseJSON() warning by updating to JSON.parse()
The jQuery.parseJSON() method has been deprecated since jQuery 3.0, and
generates a warning in the console. This patch replaces all instances of
jQuery.parseJSON() with JSON.parse(), as recommended in the jQuery
upgrade guide [1]. This ensures that the code is compatible with the
latest version of jQuery and eliminates the warning.

[1] https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-parsejson
Change-Id: I1da5a6c56cefe9bbe0c1185ac8c536eb8f2a6a35
2023-04-10 13:18:06 +00:00
manchandavishal 43a792ec94 Update deprecated jQuery functions
This patch replace uses of .bind(), .delegate(), and .unbind()
 with .on() and .off() respectively[1], in order to migrate to the
 latest version of jQuery.

 [1] https://jquery.com/upgrade-guide/3.0/#deprecated-bind-and-delegate

Change-Id: I32c1fcd33db9af34a3f041e513a6a949c4921351
2023-04-10 17:47:13 +05:30
Radomir Dopieralski 4a89303231 Clean up the syntax of html attributes to always use double quotes
Our templates are very inconsistent and sometimes even use single and
double quotes in the same tag. This is an attempt to clean it up a
little and use double quotes everywhere.

In addition, I have run into a problem with single quotes being
incorrectly escaped by the Django compressor, and I want to see if
this will help with the issue.

Change-Id: I2d5137a87ed65c6abef38a49264346f917a1c85a
2023-04-05 11:00:26 +02:00
Rafael Weingärtner ba1e7ddc9b Enable floating search bar
Depending on the size of the datatable, sometimes, the search
bar is "hidden" due to the user scrolling. To make the
interface more user-friendly, it is interesting that both
the search bar and the sidebar are always displayed. Therefore,
this patch is introducing changes to always pin the search bar
and the sidebar at the top of the page.

Closes-Bug: #1928678
Change-Id: I9186a4fa1dd2a16f75464ff3bb1c0c9b76a12cc7
2022-12-09 08:43:38 -03:00
Tatiana Ovchinnikova 892080ec0f Make readonly metadata properties unable to edit
Image metadata properties os_hash_algo and os_hash_value are
readonly, and attempts to edit them fail with unclear message.

This patch makes these fields readonly in update metadata form.

Also, if the existing metadata property is null, Horizon should
consider it optional too, in addition to empty field fix:
https://review.opendev.org/c/openstack/horizon/+/812009

Change-Id: I892465ca4688fce9f7123682d02f11c92c7d2c5c
2022-11-09 13:40:04 -06:00
OpenStack Proposal Bot a645545584 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic32b69d9f50860ef20b0c564e777cc738e0b2b81
2022-10-06 03:11:09 +00:00
Tatiana Ovchinnikova 4743c6c748 Integration test navigation machinery for Angular pages
There's an implementation of navigation modules for pages written
in Angular.
Legacy tests for images page are rewritten to work with the new
navigation.

Change-Id: Ib8a40f0adb0a46c9d646c6796a4242988eefa6e3
2022-09-26 14:19:50 -05:00
OpenStack Proposal Bot 214b99304a Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iabcaaf4f7454f5e481c6172297bc49a142494e60
2022-09-21 02:15:49 +00:00
Tatiana Ovchinnikova 1011d4237e Fix redirect after deleting from details page
On apache environments, when WEBROOT is "/dashboard/" and not "/",
redirection after deleting from Angular details page is broken. If
we go to image/key pair/server group/etc details page, and delete
it from this page, redirect url is "/dashboard/dashboard/project/..."
instead of "/dashboard/project/..."

This patch switches from using WEBROOT depentent panel navigation to
getting default index url directly from details view controller.
It also cleans up a work around that was implemented for some pages.

Change-Id: I6bd06ea479f473a319f8100cbf8d168424b62461
2022-09-14 16:37:58 +00:00
Andrey Kurilin 3a2e82ab75 Extend settings with OPENSTACK_SERVER_DEFAULT_USER_DATA
The new setting should allow an administrator to specify default user_data
for new VMs. The default user_data can be a string template that accepts
request object which has info about the user, so the default user_data can
be personalized.

Change-Id: I86ac21bf82c1667135abd4f20fb4514da0899450
2022-09-01 19:23:00 +03:00