5606 Commits

Author SHA1 Message Date
Zuul
b4554a1951 Merge "Fix ports tab at Launch Instance dialog" 2023-07-26 16:53:03 +00:00
Zuul
47e2d23740 Merge "Fix deprecated use of 'jQuery.fn.select()' shorthand event" 2023-07-26 16:29:01 +00:00
Tatiana Ovchinnikova
50e3e74cdd Fix ports tab at Launch Instance dialog
This patch adds watcher to network ports table at Launch Instance
dialog. It helps to properly load all the information about ports.

Closes-Bug: #2020630

Change-Id: I9949470fb03c423f157df3e6dab59e90c184fa42
2023-07-20 20:26:06 +00:00
Zuul
1bfd8bff60 Merge "Fix object-store container toggle for turning public access on/off" 2023-07-19 17:10:31 +00:00
Radomir Dopieralski
480aba9422 Bump XStatic-JQuery to make it work with jquery-migrate
The jquery-migrate 3 requires newer jquery than we have.
Also added all the other fixes for integration tests to see
if that resolves our problems.

This needs to be merge first so that patch which update the
upper bump of XStatic-JQuery in openstack/requiremensts [1]
can be merged.

Note: This patch also make horizon-integration job to non-voting
so that we can merge this patch and once openstack/requirements
[1] patch is merged, we will make horizon-integartion job voting
again

[1] https://review.opendev.org/c/openstack/requirements/+/887933

Co-Author-By: manchandavishal <manchandavishal143@gmail.com>

Change-Id: I9b8a5e8abe734e7fd99aa0066ede0377e34fbf44
2023-07-10 18:15:18 +05:30
Michel Nederlof
664894a597 Fix object-store container toggle for turning public access on/off
After updating to angular 1.8, changes to a object (in this case the
container object) has changed from the click event to the onchange event
for input radio's and checkboxes as described on
https://docs.angularjs.org/guide/migration#-input-radio-and-input-checkbox-

In our scenario this means the container.is_public value is changed
_after_ the ajax call went to the horizon API, effectively not changing it.

This change fixes this, by migrating to the ng-change event for this toggle

Closes-Bug: #2020879
Change-Id: If3b87da6d747bb7e738b64f4c2f3472a7556c652
2023-07-06 15:32:40 +00:00
manchandavishal
190d38b55f Fix deprecated use of 'jQuery.fn.select()' shorthand event
This patch replace the usage of jQuery.fn.select() with
 .trigger( "select" ) function to fix the
'jQuery.fn.select() event shorthand is deprecated' warning as
recommended in the jQuery docs. [1].

Note: You will get this deprecation warning while creating a keypair
in launch instance workflow.

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

Change-Id: Ibf0d2020b295108a354d62e1068c4532f12cc103
2023-05-25 11:52:45 +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
Pedro Martins
1db1764749 Add NAT rules to the floating IP workflow
The floating IP workflow is now able to manage NAT
rules (portforwarding) if the floating IP is not
associated with any NICs (ports).

This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.

The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst

Implements: blueprint https://blueprints.launchpad.net/neutron/+spec/floatingips-portforwarding-ranges
Change-Id: Id715da6591124de45f41cc367bf39a6bfe190c9a
2023-03-01 10:38:16 -03:00
Andrey Kurilin
c8ee8c1965 Fix applying OPENSTACK_SERVER_DEFAULT_USER_DATA value
The final revision of I86ac21bf82c1667135abd4f20fb4514da0899450 is buggy
and doesn't work.
This commit fixes it and adds a proper test.

Also, this commit updates the docs with a proper horizon version that
corresponds to Zed release (the feature was introduced before final Zed
cut so the author tried to guess the final release number).

Change-Id: Id921b69df13af3cc209236f0446d82dd30e4d8a2
2023-01-26 14:42:15 +01:00
Stanislav Dmitriev
827d453d7a Fix Image Filter for images with None names
Replacing None with empty string to fix non_api_filters
processing if resources have None attributes

Closes-Bug: #2002027
Change-Id: I57493837cede7747bbb634959ace28b2feffb543
2023-01-06 12:40:28 -05:00
Zuul
5fa4941310 Merge "Add the filter function in c-bak dashboard for both Project & Admin" 2022-12-14 17:35:23 +00:00
Tatiana Ovchinnikova
452c37dd36 Fix preselection for launch Instance dialog
Launch instance from a volumes/volume snapshot/instance snapshot
should open a dialog with preselected boot source. However the
dialog shows Image as selected boot source in any case, discarding
the preselection.

This patch fixes it, explicitly changing the boot source according to
the preselection.

Change-Id: I1a5a46d7be12ed179474a6a74647d0872b27b492
2022-11-23 15:48:24 -06:00
Tatiana Ovchinnikova
af7e6c4f75 Fix flavor id auto generation
Currently the flavor creation form always check for the uniqueness
of the UUID field, even when it is set to "auto". That means that if
we create a flavor with UUID value of "auto", the check will fail.

This patch disable the check when UUID is automatically generated.

Change-Id: Ie31307d67cf3857e3bb80c124e92c81e0c6a2982
2022-11-02 14:13:36 -05:00
Akihiro Motoki
516e57bc89 Add UT coverage for attach_interface by port
Previously attach_interface tests in project/instances/tests.py
did not cover the case of attach_interface by port.
This commit adds UT for such cases.

Details:
- The second call of the mocked network_list_for_tenant retured
  an empty list. It sounds tricky to change the return value for
  network_list_for_tenant() in two calls, but this trick was used
  to skip the processing of port_field_data.
  This should return a same value for the two calls to test
  port_field_data() function.
- To test the behavior of attach_interface by "port",
  an unbound port (whose device_owner/device_id of the port is empty)
  is required, so this commit adds it to neutron_data.py.
- test_interface_attach_get() covers a list of choices when "By Port"
  is selected in the form.
- test_interface_attach_post_by_port() is added.

Related to the addition of an unbound port to neutron_data.py,
the following other tests are adjusted.
They assumed that all non-network ports are owned by servers,
but it is no longer true as an unbound port is added to the test data.
Note that associating an unbound port with a floating IP is a valid
operation in neutron, so there is no problem to adjust UTs.

- openstack_dashboard/dashboards/project/floating_ips/tests.py
- openstack_dashboard/test/unit/api/test_neutron.py

Related-Bug: #1943639
Change-Id: Ib0ee342463e5668858078db43c04fe0a1be6e995
2022-10-26 15:34:17 -05:00
Zuul
794472df8e Merge "Handle empty image_type in launch-instance workflow" 2022-10-23 00:57:27 +00:00
Zuul
fade123b22 Merge "Fix success_url parameter issue for Edit Snapshot" 2022-10-21 18:24:45 +00:00
Victor Coutellier
01afd1ba70 Handle empty image_type in launch-instance workflow
Fix the getImageType function to handle edge case
when image_type attribute is present but is an
empty string.

Closes-Bug: 1993579
Change-Id: Ie08cf1010d64ff927515b4792e9b052a76b6344d
2022-10-20 10:33:28 +02:00
Tatiana Ovchinnikova
d0e9e976f2 Fix flavor specification at instance overview page
The details page uses flavor id to resolve instance flavor, relying
on legacy Nova API v2.46. This patch adds the current Nova API
option, resolving instance flavor by flavor name, so flavor
specification at instance overview page is displayed properly.

Change-Id: I1fe45063c9d1cdd8682998329d81f843d30f80b3
2022-09-29 18:49:01 +00:00
Zuul
a0560b4bf5 Merge "Fix "Set admin password" checkbox visibility" 2022-09-27 08:58:18 +00:00
Zuul
443134b54a Merge "Don't try and update port security if its not changing" 2022-09-20 17:43:01 +00:00
Zuul
34b2e82343 Merge "volume-backup add incremental flag" 2022-09-20 06:43:09 +00:00
Zuul
0850f71df6 Merge "Allow volumes in error_restoring/error_managing to be deleted" 2022-09-19 22:59:07 +00:00
manchandavishal
79d1395942 Fix success_url parameter issue for Edit Snapshot
The "success_url" param is used when updating the project snapshot
[1] and it lacks sanitizing the input URL that allows an attacker to
redirect the user to another website. This patch update 'Updateview'
class to not use the "sucess_url" method.

Closes-bug: #1982676

[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/snapshots/views.py#L109

Change-Id: Ied142440965b1a722e7a4dd1be3b1be3b3e1644b
2022-09-14 22:23:27 +05:30
Zuul
1a4d9e8025 Merge "Add cinder-user-facing messages for Backup" 2022-09-08 12:42:30 +00:00
Jesper Schmitz Mouridsen
20a571fdd2 Add cinder-user-facing messages for Backup
This patch adds a tab for cinder user messages for volume backups.
Cinder user messages show error details for cinder resources like if we
are unable to create a volume backup due to some failure in cinder it
will show us the reason for failure.
It also updates project and admin SnapshotDetailsTabs to use
DetailTabsGroup instead of TabGroup to improve top padding.
Also adds the fail_reason in the detail view, if backup errored.

Related-Bug https://bugs.launchpad.net/cinder/+bug/1978729

Change-Id: I4e639211043270e814fac489f915588af03f966a
2022-09-06 07:29:40 +00:00
Jesper Schmitz Mouridsen
61df006f4a volume-backup add incremental flag
Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer>
Change-Id: Ia99d045eda9a138cb0466930ccedf865d7a6b54f
2022-09-02 08:56:39 +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
Zuul
0a77f42156 Merge "Add pagination to Networks table in Launch Instance wizard" 2022-08-31 13:46:22 +00:00
okozachenko
3020cf5e5c Add the filter function in c-bak dashboard for both Project & Admin
Change-Id: I09b0d12e489aad8da8e9ed3dee1b02a5abcb7355
2022-08-31 02:03:07 +10:00
Zuul
272dbb61c7 Merge "Add new settings to LAUNCH_INSTANCE_DEFAULTS" 2022-08-30 11:34:06 +00:00
Andrey Kurilin
e9b8d707da Add new settings to LAUNCH_INSTANCE_DEFAULTS
The new settings ``LAUNCH_INSTANCE_DEFAULTS.enable_metadata`` and
``LAUNCH_INSTANCE_DEFAULTS.enable_net_ports`` allow to hide Metadata and
Network Ports tabs from launch instance workflow.

It is implemented in the similar way to existing enable_scheduler_hints
setting and doesn't change default behaviour

Change-Id: I3d1ae5ab6cee614dd2c400f66570e320efbe6100
2022-08-29 21:39:33 +03:00
Zuul
9bcf50f3cc Merge "Bugfix: Add missing closing </div> tags to network topology" 2022-08-22 15:03:05 +00:00
Tatiana Ovchinnikova
dd7faaa023 Fix "Set admin password" checkbox visibility
The checkbox should only be visible when 'can_set_password' is True.

Closes-Bug: #1976445

Change-Id: I887c4fcbccc6af77203d2b2bdb4f016fd9725f6c
2022-07-27 15:20:29 -05:00
Zuul
23bc866f01 Merge "Fix Self-closing syntax (/>) used on a non-void HTML element." 2022-07-05 17:11:56 +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
5ac974cf67 Merge "Deprecate Django based Panel for Images, Keypair, and roles" 2022-06-04 07:25:36 +00:00
Zuul
1f9a184de7 Merge "Remove ability to filter instances by VCPUs" 2022-05-31 05:38:13 +00:00
Radomir Dopieralski
72571a53ba Fix Self-closing syntax (/>) used on a non-void HTML element.
Newer jquery complains about syntax errors when parsing the html
template for the flavors. Running the html through the w3c checker
yields Self-closing syntax (/>) used on a non-void HTML element.

Change-Id: Ie9214f7e881e8e631f3e666bea2829e66968bc9d
2022-05-18 14:43:03 +02:00
Zuul
4ffef9ec2b Merge "Add pagination to Flavors table in Launch Instance wizard" 2022-05-18 12:08:20 +00:00
manchandavishal
65d748fb25 Deprecate Django based Panel for Images, Keypair, and roles
As discussed in the horizon meetings or in horizon PTG sessions,
horizon team agreed to deprecate django version of Images, Keypair
and Roles panel as we think that feature gaps between the two
implementations have been closed. Let's mark the Django version as
deprecated for all these panels and gather more attention
from operators.

Change-Id: I965f9dbdd5e78b52a788f73b359c1c6fbc18637e
2022-05-10 05:28:28 +09:00
Sam Morrison
f4bbc99b1a Remove ability to filter instances by VCPUs
This is not supported by the compute API so will never work.

Closes-bug: #1967183
Change-Id: I0c64f9b1c9e48a96118db55c3ec8ab92a72ada8b
2022-03-31 09:19:33 +11:00
Zuul
0798bdacd3 Merge "Add SYSTEM_SCOPE_SERVICES setting that hides panels" 2022-03-24 10:36:17 +00:00
Tatiana Ovchinnikova
b31bfe3b91 Add pagination to Flavors table in Launch Instance wizard
The most elegant way to add pagination is to refactor the table using
<hz-dynamic-table> which already contains pagination instead of wiring
it to the existing table framework.
This solution adds the pagination and makes the code more readable.

Partial-Bug: #1859423

Change-Id: I18d6b4f33b274dadc90d73d8fd10efa5b09cb4d2
2022-03-21 12:42:49 -05:00
Zuul
1bb9092abf Merge "Address RemovedInDjango40Warning (7)" 2022-03-12 22:02:49 +00:00
Radomir Dopieralski
6c814b241d Add SYSTEM_SCOPE_SERVICES setting that hides panels
Since not all services are ready to use the system scope token,
we need a way to disable and enable the use of system scope
token on a per-service basis. This setting let us configure
which services should use the system scope token. By default
the list is empty and system scope token is not used at all.

Change-Id: I5e0cdc7288221571f183a37b800c19dc4cff5707
2022-03-10 15:13:21 +01:00
Zuul
52a1025047 Merge "Address RemovedInDjango40Warning (4)" 2022-03-10 12:24:44 +00:00
Zuul
cf9a30d39e Merge "Address RemovedInDjango40Warning (3)" 2022-03-10 12:23:11 +00:00
Akihiro Motoki
f2832f3b09 instance UT: Recover mock_server_get.return_value
https://review.opendev.org/c/openstack/horizon/+/830630 dropped
mock_server_get.return_value by mistake. This commit recovers it.

Change-Id: Icedb1d206aca1c8eeac51e76b3c92c26b40f0806
2022-03-09 09:50:58 +09:00