Commit Graph

1695 Commits

Author SHA1 Message Date
Zuul 5e73220a5f Merge "Django 4.x: Replace removed features" 2023-02-20 17:56:57 +00:00
Corey Bryant d956d059f9 Django 4.x: Replace removed features
force_text(), ugettext_lazy(), ungettext_lazy(), urlquote_plus()
and is_ajax() are removed in 4.0.
https: //docs.djangoproject.com/en/4.0/releases/4.0/

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

Change-Id: I9e43926cc3011b8b7321bbec59bebe915502eb4a
2022-12-01 23:05:33 +05:30
OpenStack Proposal Bot 6b5b8bb17e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I21adf85aa796bb3c9200e8937024dbf5b063d90c
2022-10-17 04:00:19 +00:00
Andy Botting 8aceeda565 Add designate support for Zone choice
This commit adds support for Designate zones. This can be used to
provide the user a drop down list of zones they can choose from when
launching apps.

This should be coupled with a commit to murano to add a new
io.murano.resources.RecordSet resource type, so that new a new DNS
record can be added for new apps.

Change-Id: I71deb3e264b2777ec4126d8e46c3ac45b9fc42c6
2022-10-12 04:54:52 +00:00
manchandavishal 02edabd873 Migrate to AngularJS v1.8.2
This patch aligns current code with AngularJS v1.8.2 requirements.

Change-Id: Ibabbaa0492b1734230d3748993fcd4775d8669fb
2022-06-28 22:24:39 +05:30
manchandavishal 7f29364734 Fixed Unit test for murano-dashboard
After 7052b7f065 merged in openstack/horizon a new Unit
test class introduced in horizon i.e. RestAPITestCase.
This patch updates murano-dashboard to import RestAPITestCase
class instead of TestCase. For more info. see [1]

[1] https://review.opendev.org/c/openstack/horizon/+/827097/2/openstack_dashboard/test/helpers.py#485

Change-Id: I83c5b5a35b63790df1919974cbb4236eefd05b5d
2022-04-01 07:41:50 +00:00
Thomas Goirand 81195976cd Django 3.2 support
This patch fixes a few issues regarding Django 3.2 support.

Closes-Bug: #1944523
Co-Author: Daniele Mazzocchio <daniele.mazzocchio@infomaniak.com>
Co-Author: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I1d906e2d910b25a79acfc13b7f3d890476ee301e
2021-09-23 02:23:20 +09:00
Dmitriy Rabotyagov fb7d081bc8 Fix horizon compilemessages with murano ui enabled
Currently if you enable murano UI and try to compile messages you will be
thrown `NameError: name 'HORIZON_CONFIG' is not defined

So we explicitly import HORIZON_CONFIG along with POLICY_FILES
to make horizon successfully compile when murano-ui
was enabled.

Change-Id: Id5ab97349f702be1afc536c154cf0e35197150b8
2021-08-20 18:52:19 +03:00
OpenStack Proposal Bot dd78672b3f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3531c2c0c6fbdc102169c1f9451a858b8c601151
2021-03-03 07:08:34 +00:00
OpenStack Proposal Bot afb552342b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ie25789d0ee87604252e436e3ddab1c225ab62d03
2020-10-05 07:31:09 +00:00
manchandavishal 1c1dac9aa6 Cleanup for Refactor-error-messages
This patch is a clean-up patch for refactor-error-messages bp
which remove the exception message from base message otherwise
the same exception message display twice like
this https://ibb.co/XyFWMdz .

Depends-On: https://review.opendev.org/#/c/708069/
Change-Id: I4e0f50b95b7c94cf641fc778268b6c4c1267175c
2020-08-28 15:18:14 +00:00
Sam Morrison 8fe073043a Switch to py3 syntax for dictionary contains test
Change-Id: Ia57576b7dd7ba7f1dd34cd4f17942fbf753ea6f8
2020-07-23 09:44:23 +10:00
zhurong f91d017789 Remove six
Change-Id: I15ab42b44fbc40a66a52d1fd16087ee18c8b0494
2020-04-21 05:53:26 +00:00
Sean McGinnis 22efa8fd7f Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I5ad2c7a44dee2e19ab2576f206c69d94126a22b1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>
2020-04-20 03:54:03 -07:00
Andreas Jaeger c80e23edfd Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: I7073a478d38fb46619e7a300808e9449403e704d
2020-03-30 10:49:50 +00:00
manchandavishal 90de7126e3 Revert the original logic in code
Change Ibc743a552a43147153dd0ca3a46ab8d977c7ca0d changes the
logic[1] in wrong way and for the test[2] as well.
This patch corrects the same.

[1] https://opendev.org/openstack/murano-dashboard/src/branch/master/muranodashboard/packages/views.py#L419
[2] https://opendev.org/openstack/murano-dashboard/src/branch/master/muranodashboard/tests/unit/packages/test_views.py#L488

Change-Id: I80f3aa160b41554fa319e6ced2edf5a39d366302
2020-02-12 06:10:40 +00:00
manchandavishal a85d874748 Remove six usage
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.

Change-Id: Ibc743a552a43147153dd0ca3a46ab8d977c7ca0d
2020-02-10 02:51:16 +00:00
zhurong cdf733741c Change Ussuri python jobs template
Change-Id: I9b6232551b6c6639d1c0e0c1261662804bbcdbf8
2019-11-18 03:55:49 -08:00
zhurong 4eb6d37a2a Fix semantic_version compared
Change-Id: I1e9566c9e5cc93c87f38286965677e5f07009ab2
2019-09-26 00:16:54 -07:00
Zuul 22d76c1da5 Merge "Remove 'add' button for keypairs on launch" 2019-08-15 11:48:26 +00:00
Andy Botting a8848d9a2f Make sensible default choices for fields
This commit makes some sensible default choices for fields
when adding and application to an environment. These are applied
to the image and keypairs fields.

In both cases, if only one option is available, then make that
the initial value selected.

In the images case, we take it a step further and if there is
only one image, make that the only choice, dropping the
'Select Image' option completely.

Change-Id: I24462374a50c1b8d83970f10278362f3dc5daf8b
2019-08-15 14:55:32 +10:00
Andy Botting f5eccdc353 Remove 'add' button for keypairs on launch
The add keypair button referenced a view that it no longer
available when using the new angular keypairs panel, otherwise
a 'Danger' error is thrown then you try and click it.

This commit simply removes the add button as there is no way to
get the functionality back when using the angular panel.

Change-Id: Iaf7aa5f0805ba91d2f7f9115cc3cf19cf344dd4b
2019-08-15 14:51:27 +10:00
Andy Botting be8d112153 Fix adding dependency package to environment with debreach
When using the debreach random comment middleware with Django,
the API response when adding a dependency package to an
environment would end up with a html-style comment at the end of
the response, which would then fail JSON parsing by the dashboard.

To prevent debreach from adding the random data, the content type
needs to be something other than text/html. The response output
itself isn't really JSON so switching to JsonResponse doesn't
work becuase the content isn't a dict, so just use text/plain
instead.

Change-Id: Ie710487d865344c9a5cd71d4dec3bf927cfabf40
2019-08-13 15:30:48 +10:00
OpenStack Proposal Bot 3342531a81 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2032047950d3de9dac190858f15d4b61d10a863a
2019-08-09 08:01:28 +00:00
Zuul c427281787 Merge "Hide availability zones that are not available" 2019-08-01 01:06:23 +00:00
zhurong 3cb13c6c26 Fix py27 UT gate
1.Fix TypeError: 'Mock' object is not iterable error
2.import openstack_dashboard.test.settings

Change-Id: I9f2b640b1d58bc4f3f559458d9eed92c9594e686
2019-07-31 07:32:12 +00:00
Andy Botting 5838b91435 Hide availability zones that are not available
Availability zones that were unavailable should have been filtered
from the list, but weren't due to incomplete filtering.

This commit specifically tests whether the AZ status is available
before allowing it in the list of choices.

This filtering mechanism is the same as how the OpenStack dashboard
'Launch Instance' dialog handles availability zone availability.

Change-Id: I8bdb38e29209aff92f51532812b409e48462a0af
2019-07-25 15:05:28 +10:00
Zuul 257bfb0a35 Merge "Remove the dependency of floppyforms" 2019-07-04 07:15:51 +00:00
Zuul 56aee2e7cc Merge "Fix dictionary changed size during iteration error with Python 3" 2019-06-17 04:17:05 +00:00
zhurong ea2749ad12 Import openstack_dashboard defaults settings
Change-Id: Ib663053032c096f04aec814131d418719a2e53f6
2019-06-15 11:22:55 +08:00
Andy Botting 27483f3c65 Fix dictionary changed size during iteration error with Python 3
In Python 2, dict.keys() would return a copy of the keys as a
list which could be modified. In Python 3 it is returned as an
iterator which can't be modified, so simply cast it as a list.

Change-Id: I0c955337b689ad2cbdb3975ca4f1ddd52e277a70
2019-06-12 14:53:23 +10:00
Zuul 005f36b347 Merge "Change devstack default role Member to member" 2019-03-13 05:54:49 +00:00
zhurong 50076cf2d2 Fix selenium test test_abandon_two_environments_at_once
Change-Id: I66419001ba6fee4c2d665c5178e82905dc184831
2019-03-13 02:16:13 +00:00
melissaml 939f1bcfd6 Change devstack default role Member to member
Change-Id: Ie66b80297dc957c3127e45ccda253414ac8d41e2
2019-03-12 14:14:29 +08:00
Zuul ecf9680768 Merge "Change devstack default role Member to member" 2019-03-12 06:01:55 +00:00
zhurong de877e9235 Change devstack default role Member to member
Change-Id: If1ce612cc27fe46a1a9d06c29740d098d02b872c
2019-03-12 11:15:21 +08:00
zhurong 673f501fc9 Using six to fix python2/3 compatible
Change-Id: I405284808be78082e96d077ba11a59534affba12
2019-03-12 09:28:26 +08:00
Zuul eb5a03ee72 Merge "Fix selenium test test_filter_component_by_tag" 2019-03-07 11:38:46 +00:00
zhurong 0f78176c62 Fix selenium test test_filter_component_by_tag
Change-Id: I680d343f531f11c87cc04a35e9ab98a3119cb1db
2019-03-07 09:32:50 +00:00
zhurong d8891aba61 Fix selenium test test_check_env_name_validation
Change-Id: Ieea327d20eedd0f06c3fb8948f6a78631cdb6b22
2019-03-07 05:55:35 +00:00
Zuul c87a2ac5d0 Merge "Fix selenium test test_filter_by_tag" 2019-03-05 03:17:09 +00:00
zhurong 9eec74f84b Change import module nova to _nova
Since horizon separate module nova to _nova in commit [0],
change this for murano-dashboard.

[0]: If91cf4f30d2ddab471757129c2a74b26b6d38b1e

Change-Id: I4160342c571a5c0d952f96503de920fedc88a33b
2019-03-04 17:16:39 +08:00
zhurong bb138ac615 Fix selenium test test_filter_by_tag
Change-Id: Ibbccff6e56fad1c4ee79da0785c74c668e96a5e2
2019-03-04 16:14:43 +08:00
zhurong dc0bc45713 Remove the dependency of floppyforms
django-floppyforms is not very well supported anymore
and was dropped from Ubuntu in Xenial.

Closes-bug: #1805193
Change-Id: I46bf2d43794a67a4dc080afa9f1740a582cb7631
2019-02-27 05:42:23 +00:00
Zuul 2afddfb50e Merge "Clean up usage of APIMockTestCase" 2019-02-15 08:52:33 +00:00
zhurong 838201b55c Add mock request to Datatable to fix murano-dashboard UT
Change-Id: Icef90d10a99a6ec63540a6e87d98185efb44c938
2019-02-15 14:12:57 +08:00
Akihiro Motoki 98ef69ab2c Clean up usage of APIMockTestCase
In Stein development version of horizon, APITestCase and APIMockTestCase
are identical, and APIMockTestCase will be dropped in future.
murano-dashboard is the only consumer of APIMockTestCase now.
This commit clean up the usage of APIMockTestCase.

horizon stein depends on osprofiler>=2.3.0, so lower-constraints.txt
file is updated accordingly.

Change-Id: I36cb8ade8ec80cd313dc9be9e1f1a67daeb60c87
2019-01-31 23:43:42 +09:00
zhurong 7395b40177 Add a mock request for Tab
Change-Id: I6e337008910f229dccc5185ac565b673845c3f4b
2019-01-24 18:28:25 +08:00
zhurong 18b276ecdf Fix python3 compatible use six
Change-Id: I0b27beefb3099f1a5a59d89ec90229a94259ebb2
2018-10-23 18:49:26 +08:00
zhurong 4985bfa010 Switch test runner to django default runner
nose is not actively maintained now and Django default test runner
seems to have enough features.

Horizon test setting no longer depends on nose and related stuffs.
This commit cleans up nose related dependencies.
The change was made in horizon Rocky-3,
so horizon 14.0.0.0b3 is required at least.

And murano-dashboard using unittest instead of testtools.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I419e0e166ea88c3ab1203f35ffa00928cf94acb1
Depends-On: https://review.openstack.org/599156/
2018-10-09 02:22:08 +00:00