Commit Graph

1388 Commits

Author SHA1 Message Date
Zuul f0544f073e Merge "i18n: nested <translate> tag does not work" 2023-11-07 14:01:27 +00:00
Akihiro Motoki 783b2039f0 i18n: Avoid using variables in gettext() in network QoS edit rule
If an argument to gettext() contains variables, strings extracted
and strings used when rendered will be different (as variables are
evaluated as empty during string extraction to POT).
As a result, translations for these strings aree never used.

This commit fixes the issue by defining strings with variable
substitions (like%(id)s) in gettext() combined with interpolate().

Labels of "Rule to edit" pulldown menu in "Edit Rule" form are
updated to match the format used in "Delete Rule" form.

Closes-Bug: #2037278
Change-Id: I06cb56ada2c842e5a445026b4649260bf9893841
2023-10-02 15:04:32 +09:00
Akihiro Motoki d31bf68579 i18n: nested <translate> tag does not work
rule.description.html in network QoS panel used <translated> tag
in a nested way. As a result, strings used when looking up in a PO file
does not match strings extracted into POT file. See [1] for details.
This commit adjusts the help message without nested <translate> tag.

[1] https://bugs.launchpad.net/horizon/+bug/2037875/comments/2

Closes-Bug: #2037875
Change-Id: I146e45681a29cb264fa40898cfc5f636143b2701
2023-10-01 17:25:08 +09:00
manchandavishal 339e7604aa Fix deprecated use of 'jQuery.fn.change()' shorthand event for volume
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]. You will get this
deprecation warning while doing multiple CRUD operations for
volume resources.

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

Change-Id: Idb131167754a3db6eb9735c82d0c6808bad836a4
2023-05-17 20:29:02 +05:30
Tatiana Ovchinnikova c770785dcf Fix qos and trunks tables
When replacing deprecated custom callback methods success()/error()
with then()/catch(), we need to keep in mind that methods' signatures
and return values are different, so we need to explicitly return the
response value when using then(function onSuccess(response){}).

Closes-Bug: #2018232

Change-Id: I9d6d769075753c6395db2530a8d60ec28cafdc3d
2023-05-09 14:11:41 -05:00
Zuul 2cd7093804 Merge "Fix deprecated use of 'jQuery.fn.change()' shorthand event" 2023-04-27 05:35:54 +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
Zuul 66fa187586 Merge "Update deprecated jQuery functions" 2023-04-25 21:11:04 +00: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
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 6d34551c1c Fix deprecated use of 'jQuery.fn.mouseenter()' shorthand event
The mouseenter event shorthand is deprecated in jQuery 3.0
and above. 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.mouseenter(). Please refer [1].

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

Change-Id: I8b746184e6ab260ba0b0292989bd4078767e509e
2023-04-12 18:48:49 +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
Zuul 76650bbfa7 Merge "fix(swift): allow object creation" 2023-03-23 22:53:38 +00:00
Mohammed Naser a327842a25 fix(swift): allow object creation
It is currently not possible to create any new objects inside
Swift as you'd always get an error that the new object name
already exists all the time.

This fixes that issue and enables you to upload files again.

Closes-Bug: #1993005
Related-Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4
Change-Id: Ib2f1aaae87820e8d5c4a6c9b01b6a6e9a5552952
2023-03-22 19:09:48 +00:00
Tatiana Ovchinnikova 557a56c102 Drop readonly image metadata properties from request
Glance doesn not accept editing specific readonly metadata
properties, so we need to remove them from update request.

Change-Id: Ia9d8381f4add5cf6d82f2568b483d1c0b8d1a8b7
2023-02-23 15:00:47 -06: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 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
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
Tatiana Ovchinnikova d8802fef6d Fix Create Container issues
This patch fixes container name check and Create Container action.

Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4
2022-06-17 11:23:54 -05:00
Tatiana Ovchinnikova f044c4b0a3 Migrate to AngularJS v1.8.2
This patch aligns current code with AngularJS v1.8.2 requirements.

Change-Id: Ifdad18e805953957bfaa1b42908dfbbe8976dbcb
2022-06-08 15:43:13 -05:00
Zuul 3bc1458e60 Merge "Add Rules operation to Network QoS Policy" 2022-02-21 20:20:37 +00:00
zitptan aa83752f20 Add Rules operation to Network QoS Policy
Added create, edit, and delete rules operation to the
network qos policy.
Rules: Minimum-Bandwidth, DSCP-Marking, and
Bandwidth-Limit, Minimum-Packet-Rate

Partially-Implements: https://blueprints.launchpad.net/horizon/+spec/create-network-qos-policy

Change-Id: I49058036f1d78ef022d966f6b375cdc984755813
2022-02-17 13:40:39 +01:00
Zuul a629893a10 Merge "Modified the image page to use CSS class" 2022-02-03 01:06:29 +00:00
Sam Morrison 062150f458 Include the images name on the image detail page
Change-Id: I32b806fc6c42ad6a2b3087d595f5b4f0fe5447d5
2021-12-01 13:48:50 +11:00
Wei Lingfei e9ca001623 Modified the image page to use CSS class
Pages can not display normal when language is Simplified Chinese(zh-cn),
a row in the table can display only one Chinese character.

Remove "width: 100%" rule from the "word-wrap" class.

The page should now display normally.

Partial-Bug: #1936830
Change-Id: If72d49c78a9f83687785a1225151d819b85e88d2
2021-10-08 10:20:04 +08:00
Tatiana Ovchinnikova 9b28ab4028 Add horizontal scrollbar to role dropdown
Manage members dialog has a dropdown which lists all the role names.
If a role name is long enough, it pushes all the roles to the left
and hides them partially. This patch adds horizontal scrollbar for
such cases.

Closes-Bug: #1926511

Change-Id: I1bbf3b23717f9924974920d6569e018b94e3dbe8
2021-09-14 15:42:02 +00:00
Zuul a0ffbe4664 Merge "Enable CSRF token handling for PUT and PATCH reqs" 2021-09-08 18:02:56 +00:00
zitptan 1800750804 Add Create QoS operation to Network QoS Panel
Enabled Network QoS panel and added a button for
creating a new network qos policy with parameters
name(string), description(maxlen-255), and
shared(checkbox)

Partially-Implements: https://blueprints.launchpad.net/horizon/+spec/create-network-qos-policy

Change-Id: Ifabfac7553ddbb65fe387187da5dd2fafad31351
2021-08-09 13:12:02 +00:00
Brian Rosmaita b58ac2894b Drop cinder v2 API support
Cinder v2 API is deprecated since pike release. Along with the removal
of cinder v2 API support in cinderclient (change I335db5c1799e drops
v2 support), this commit drops cinder v2 support in horizon.

The next release of python-cinderclient drops v2 support,
so horizon needs to use v3 classes.

Includes a workaround in unit tests for two cinderclient.v3 classes
that are missing in the cinderclient releases prior to 8.0.0.  The
workaround can be removed once cinderclient change I335db5c1799edb2
is merged and released.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Iab0f097fab6696462572dc6ea53767c91e5411b1
2021-07-19 08:00:58 -04:00
Vadym Markov c635efeceb Enable CSRF token handling for PUT and PATCH reqs
Currently, passing of CSRF token embedded in html enabled only for
POST AJAX requests. But in some cases dashboard uses PUT and PATCH
requests, e.g. at Admin-Compute-Flavors-Update Metadata modal window.
Proposed patch enables passing of token also for such requests

Related-bug: #1819423
Change-Id: I39ed5286236f0a1a31665b6ca8b19edb656b1a9c
2021-07-01 18:21:17 +03:00
Akihiro Motoki f78a9c2c08 Allow themes to override bg color of even lines of horizon tables
Change-Id: I917a8bf9728729d46981d120f510952a750b1270
Closes-Bug: #1900863
2021-02-28 13:19:47 +09:00
Tatiana Ovchinnikova b65700a865 Show project name at launch instance dialog
It is easy enough to create instances in the wrong project.
This patch displays project name at launch instance dialog.

Closes-Bug: #1895588

Change-Id: Ied681bc3d1b4213bd6bacb3042b377ec2ac10855
2021-01-19 15:11:47 -06:00
Tatiana Ovchinnikova 807a33e1c8 Update ESLint devDependencies in package.json
This patch updates outdated JavaScript dev dependencies.

The latest ESLint version adds rules changes. Some rules are disabled
to prevent checks failures, some minor issues are fixed.

Change-Id: I01c5ccb5c8f7ceb827a3978157b4d76805d259c1
2020-12-16 12:20:10 -06:00
Tatiana Ovchinnikova 0a4fda0c0c Add default index URL to Server Groups module
Default Index Url is missing for Server Groups which causes improper
redirect to details page opened in a new tab.

Related-Bug: #1902821
Closes-Bug: #1889397

Change-Id: I8d5e68085727bd7a6402a0041c93986b6b40bb32
2020-11-26 16:48:12 +00:00
Akihiro Motoki 3c6286a9e9 Drop the usage of nova extensions in JavaScript code
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (2/3)

References to nova extensions are cleaned up.
The logic to fetch nova extension list is finally dropped.

Change-Id: If4876634276eff37ab0a18a49e6e97851d41911b
2020-10-27 20:00:45 +09:00
Tobias Urdin 4eb8285b17 Fix missing comment in swift storage policy code
Change-Id: I3a3cccc5c26d6fb6991dd22e5bbe0cd255cb5790
2020-09-10 16:45:43 +02:00
Zuul c9561ad979 Merge "Added Bootstrap and css for responsive page" 2020-09-09 01:34:58 +00:00
Pavani Peddapalli 00f90b2998 Added Bootstrap and css for responsive page
As the label is not inline with filter added
bootstrap to make it adjust with screen-width

Change-Id: I189b0da7e4194e2e65230019f99598d97a50f802
Closes-Bug: #1445591
2020-09-08 21:26:35 +00:00
Tatiana Ovchinnikova 71ed12f622 Fix Angular mediumDateFilter
Angular mediumDateFilter provides user with a readable date format
using predefined localizable format "medium". However it should be
more flexible with different types of inputs. This patch fixes the
filter and applies it at the images overview page.

Change-Id: I7079c306c6f98f13c779e6dae7357ccabba2d460
Closes-Bug: #1841049
2020-08-26 17:06:50 -05:00
Zuul f00f013f16 Merge "Revert "Add required mark on Create and Update image form"" 2020-08-19 14:16:17 +00:00
Ivan Kolodyazhny d5368c97a4 Revert "Add required mark on Create and Update image form"
This reverts commit 55878ae4b2.

Minimum Disk and Minimum RAM are not required in the Glance API [1].


[1]https://docs.openstack.org/api-ref/image/v2/index.html?expanded=create-image-detail#request

Change-Id: I79212d0b5552fce3dffb5c5527b65e48e1325f52
2020-08-19 10:31:49 +00:00
Simon Merrick 2735f2c08d Add support for multiple swift storage policies
+ Adds endpoint for listing available policies
+ Support to select a storage policy for new containers
+ Display container storage polcy on dashboard.

Change-Id: I588452fd5d6417859f5dd19ccedcb18f420ab646
2020-04-16 22:18:06 +12:00
Radomir Dopieralski ef4055e288 Fix use of ngettext in registry getName
The setNames and getNames functions in the resource registry were
calling ngettext() on already translated strings that were marked for
translation with gettext() and not ngetttext(). That lead to some
page titles in some locales being displayed as single characters.

Closes-Bug: #1762089
Change-Id: I0ef365e0c0de6ae27a2e80bcb5257132f8c6ba29
2019-12-20 09:44:48 +00:00
Zuul daffc72bfc Merge "Send binary frame in websocket client" 2019-11-26 14:00:48 +00:00
Zuul 20b91e4216 Merge "Remove dependency on novaclient list_extensions API" 2019-10-25 14:08:08 +00:00
Zuul a9c322ba75 Merge "Add required mark on Create and Update image form" 2019-10-25 11:30:16 +00:00
Matt Riedemann b148c92075 Remove dependency on novaclient list_extensions API
The novaclient list_extensions API binding was removed in the
16.0.0 release [1]. The ability to enable/disable extensions
in nova has been deprecated since Liberty [2] and was removed
in Newton [3].

For horizon this only matters for the OPENSTACK_NOVA_EXTENSIONS_BLACKLIST
config setting and some javascript code used to compile panels based on
enabled extensions. In order to work with novaclient 16.0.0+, this
change removes the list_extensions usage since all extensions
are enabled in nova and thus for horizon a nova extension is only
not supported if it's in the configured blacklist. To continue supporting
the javascript code which uses the getExtensions function, the extension
names are hard-coded. Note that the method meant to test that code,
_test_extension_list, was wrong but never ran because of the underscore
prefix on the method name. That is fixed here.

[1] https://review.opendev.org/686516/
[2] https://review.opendev.org/214592/
[3] https://review.opendev.org/351362/

Change-Id: Iebb1e78c718b931d632445e4de6d7a29ccb92be2
Closes-Bug: #1847959
2019-10-24 15:24:39 -04:00
Hongbin Lu ea2212ebe5 Send binary frame in websocket client
Websockify 0.9.0 rejected receiving text frame:
8eb5cb0cdc
We have to switch to binary frame instead.

Change-Id: I2677b8879ccb27def22126811c347d5c08f5aada
Closes-Bug: #1847889
2019-10-13 02:54:14 +00:00