5685 Commits

Author SHA1 Message Date
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
Zuul
cc60df3a9a Merge "Change to a proper policy for Resume operation" 2022-03-07 07:04:48 +00:00
Akihiro Motoki
a7956cd004 Avoid extra flavor_get in resize server form
commit d269b1640f49e13aa1693a175083d66a3eaf5386 fixes the bug on
the resize server form, but it introduced an extra flavor_get call
even when we retrieve the list of flavors. This commit recovers
the previous behavior that we first looks up the list of flavors.

Related-Bug: #1940834
Change-Id: I891aa6b8652f330326535732d0886362dfabb989
2022-03-04 22:50:42 +01:00
Keigo Noha
29da801528 Change to a proper policy for Resume operation
Previously, ToggleSuspend class checked 'os-rescue' policy for resuming
an instance. To align to resume operation, this fix changes to
'os-suspend-server:resume'.

Closes-Bug: #1963652
Change-Id: If6386ecdb81fb1f0d88dab447ee81c251b9857b7
2022-03-04 17:38:20 +09:00
Zuul
dd9e4c82b5 Merge "Address RemovedInDjango40Warning (2)" 2022-03-03 10:14:04 +00:00
Zuul
0899f67657 Merge "Fix Project Limits for resize instance dialog" 2022-02-28 13:10:01 +00:00
Zuul
6a64bdd625 Merge "Get ports directly instead of via loop" 2022-02-25 19:08:44 +00:00
Zuul
b2b12bbf9c Merge "Follow-up: Drop Django launch instance (part 2)" 2022-02-25 17:07:48 +00:00
Nicolas Bock
9f5d659d16 Get ports directly instead of via loop
In order to get a list of available ports, the current implementation
of the form code in `project/instances/attach_interface` loops through
the available networks in the project and requests a list of ports for
each via the Neutron API. This implementation is O(N) in time with a
large prefactor (the time for a Neutron API call) where N is the
number of networks.

Instead of calling the Neutron API for each network this change uses
one call to the Neutron API to get the list of ports on all networks
and filters this list via a list comprehension. While this
implementation is still O(N) the prefactor is significantly smaller.

Closes-Bug: #1943639
Change-Id: I8fd32c3aad22d8ef7f57201f5144f6b2e357ef10
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2022-02-24 16:23:38 +09:00
Sam Morrison
f9eb7c8d99 Bugfix: Add missing closing </div> tags to network topology
Change-Id: I6d6048f78f56d0f3ca0f5804f1059bf31cde6a9e
2022-02-24 08:35:25 +11:00
Zuul
5e385fab25 Merge "Address RemovedInDjango40Warning (1)" 2022-02-20 20:11:15 +00:00
Zuul
f165de3e4f Merge "Implement pagination in admin/proj network tab" 2022-02-20 19:58:33 +00:00
Tatiana Ovchinnikova
c97e6c6845 Add pagination to Networks 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: I10dad8367b444f1097e677fb3dfec841405dcbc7
2022-02-17 18:55:25 -06:00
Rodrigo Barbieri
196de449b6 Implement pagination in admin/proj network tab
Added pagination support to the networks page under
Project and Admin Dashboard.

To accomplish so, the method network_list_for_tenant
in api/neutron.py that is used for listing networks under
the Project Dashboard was refactored to merge the different
requests for shared, non-shared and external networks while
tracking the pagination for each of those requests, so for
instance when all the shared networks are listed and paginated
then the non-shared networks are queried and so on.

For the Admin dashboard all network types are retrieved under
a single request so it is a simpler pagination logic.

Partial-Bug: #1746184
Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025
2022-02-16 18:15:48 -03:00
Akihiro Motoki
3c4accf94f Follow-up: Drop Django launch instance (part 2)
This is another follow-up of dropping the django version of the
launch instance form. ResizeInstance workflow was cleaned up
as a follow-up in [1] and "config_drive" field no longer exists.
This commit drops an unnecesary check for "config_drive" field in UT.

[1] https://review.opendev.org/c/openstack/horizon/+/826262/

Change-Id: Ic3c458f70b146299f41a3ac02b78ddc156e02d93
2022-02-16 19:35:33 +09:00
Vadym Markov
d269b1640f Fix for "Resize instance" button
Currently, "Resize instance" widget is not working because it relies on
legacy Nova API v2.46, obsoleted in Pike release. Proposed patch make
Horizon use current Nova API (>=2.47).

Closes-Bug: #1940834
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Id2f38acfc27cdf93cc4341422873e512aaff716a
2022-02-16 16:07:55 +09:00
Zuul
18545ca921 Merge "Mark "Source" tab in the launch instance form as required" 2022-02-15 11:07:32 +00:00
Zuul
8b4e31fbd6 Merge "Update default value of OPENSTACK_KEYSTONE_DEFAULT_ROLE" 2022-02-10 20:31:25 +00:00
Akihiro Motoki
7052b7f065 Address RemovedInDjango40Warning (7)
HttpRequest.is_ajax() was marked as deprecated since Django 3.1 and will be
removed in Django 4.0 [1].

While the current implementation of is_ajax() relies on a jQuery-specific way
of signifying AJAX as noted in the Django relnotes, horizon works with this.
Thus this commit copies the existing logic of HttpRequest.is_ajax() to the
horizon repo (as horizon.utils.http.is_ajax()) and consumes it.

https: //docs.djangoproject.com/en/4.0/releases/3.1/#features-deprecated-in-3-1
Change-Id: I3def53033524985818a891a1b9d4659fad4ba2ba
2022-02-04 16:27:32 +09:00
Akihiro Motoki
e4444e6979 Address RemovedInDjango40Warning (4)
In Django 3.0, django.utils.http.urlquote(), urlquote_plus(),
urlunquote(), and urlunquote_plus() are deprecated in favor of
the functions that they’re aliases for: urllib.parse.quote(),
quote_plus(), unquote(), and unquote_plus().

https: //docs.djangoproject.com/en/4.0/releases/3.0/
Change-Id: I37fcd917cbf87b4d3141cfbdd2675aa38f33f2a4
2022-02-04 16:27:18 +09:00
Akihiro Motoki
d9266fd82c Address RemovedInDjango40Warning (3)
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path().

https://docs.djangoproject.com/en/4.0/releases/3.1/#id2

Change-Id: I484694f8718f61c022126a1935cf28fce075894b
2022-02-04 16:26:54 +09:00
Akihiro Motoki
cd7c1b5110 Address RemovedInDjango40Warning (2)
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
2022-02-04 16:22:07 +09:00