Commit Graph

404 Commits

Author SHA1 Message Date
OpenStack Proposal Bot 097d12aee2 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ied14cf6c81db0cdf8ace77f32510a4b38decde19
2022-06-21 03:17:52 +00:00
manchandavishal 6289954907 Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093

Change-Id: I0f7a59d28f8611ccaf66143ea6cdf0a89cedf80f
2022-04-29 22:41:30 +05:30
Zuul 75f1f95bba Merge "Change policy file format to yaml" 2022-02-03 09:51:08 +00:00
okozachenko d062507ef5 Change policy file format to yaml
https://governance.openstack.org/tc/goals/completed/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I487bbe982b83db5e1815a4c8a06d5fd0e203e8ee
2022-02-03 18:33:15 +11:00
Adrian Czarnecki 1ce80db6e0 Add time/times to alarm def creation
Change-Id: I66affefab3f8a95452a4fb724da3870e5928d3ce
2021-11-21 15:42:24 -08:00
okozachenko 99591546cf Convert dimension value type from byte to str in MonascaProxyView
To get the dimension value, urllib.parse.unquote() func is used in
MonascaProxyView._convert_dimensions. urllib.parse.unquote() func
requires str only until python3.8.

Change-Id: Ib52b4c2065dee10a96f1644cf1ec474b60147d87
2021-10-02 18:39:08 +02:00
Martin Chacon Piza e90fb181f5 Remove prefix 'dim_' from dimensions in Drilldown Dashboard
Change-Id: Idc5a93ebcdbe3bae622fa70c1e900533bf4a7c1c
2021-03-23 21:23:42 +01:00
Martin Chacon Piza 36cc4be740 Add missing PY3 support in overview views
This method is ussed in Grafana Dashboards with Horizon
Authentication. The panel wasn't able to display the metrics
when dimensions are used as filter.

Change-Id: Id6e92a371df39d2dfcfe8125ef50a76e295ab223
2021-03-23 12:26:34 +01:00
OpenStack Proposal Bot eb44a1031e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iddc99691aface0757ca8440711ae680799044901
2021-03-13 07:02:46 +00:00
OpenStack Proposal Bot 2ec9b30f2e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If52ac727ebda22de75b205a350e22655299ee271
2020-11-04 07:50:37 +00:00
wangzihao c1ae54b120 Remove six
Remove six Replace the following items with Python 3 style code.
- six.text_type
- six.moves.urllib
- six.PY3

Change-Id: I8d2357e51d570e9e0513326248878fd0133144bb
Story: 2008305
Task: 41203
2020-11-03 11:21:10 +01:00
manchandavishal b4991fcf25 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: I1ddea97cdcaf4142d9dabcf4a629e805a9c1e152
2020-09-16 08:19:57 +00:00
Michal Piotrowski 2bfbee4bb9 Alarm definition breakes Alarms view
Change-Id: Iab4bfabc21dee3709ba3d7f13e67b3a12a90b396
Story: 2008005
Task: 40654
2020-08-14 10:28:01 +02:00
Hervé Beraud ca55abec23 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Bump horizon to 18.3.0 in lower-constraints.txt since it is the
first version with "Use unittest.mock instead of third party mock"
change [1]

[1] 7eeb9e14f9

Change-Id: Ic64fffaeded18ac11ce438c77526e60a37aeaa1d
2020-06-10 13:59:58 +02:00
Hervé Beraud 560c890dce Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I57212750f6bfc922fb462dee15567e864f73743e
2020-06-02 20:25:55 +02:00
OpenStack Proposal Bot 81d397bb79 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib832257185b3709d33055aff00072e8918dd052d
2020-05-07 08:02:25 +00:00
Andreas Jaeger f037523797 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Remove hacking and friends from lower-constraints, they are not needed
for co-installing.

Change-Id: Ibef3bbaceb61612d678c542bc8c95da24a7e2c87
2020-04-01 12:22:43 +00:00
manchandavishal a3b46a1ab0 Use Horizon project template for django jobs
Horizon defined a project template 'horizon-non-primary-django-jobs'
for django jobs [1]. This patch use that template to run django jobs
here and also fixes the failed test cases for django2.2 support
by adding renederer argument[2] and fix setting.py.

[1] https://review.opendev.org/#/c/681969/

[2] https://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1
Change-Id: Ibe6e1a965179022873630e61529a3318ece7e66b
2019-10-21 07:18:44 +00:00
Zuul ac9b6e163c Merge "Use django.conf.settings instead of local_settings" 2019-09-30 12:58:35 +00:00
Zuul be82b1d88d Merge "Add content-type field and change link in dashboard" 2019-09-25 14:58:52 +00:00
Arseni Lipinski df2e57b942 Add content-type field and change link in dashboard
Change-Id: Id072634b234970a990d941489158fb4b9c9fe32c
2019-09-19 09:05:47 +00:00
Witek Bedyk 855a1f2fc5 Use django.conf.settings instead of local_settings
The default and preferred way of modifying the settings of Horizon
plugin is to add a configuration file to
openstack_dashboard/local/local_settings.d/ directory [1]. For that to
work we should use the settings from django.conf.settings and not from
monitoring.config.local_settings.

[1] https://docs.openstack.org/horizon/latest/configuration/settings.html

Story: 2006556
Task: 36644

Change-Id: I5cd66954ffb1169f3149cd6f705593efe3a15b13
2019-09-16 15:19:32 +02:00
Gloria Gu 43f285394f Hide Graph Metric action of alarm when Grafana is not available
When Grafana integration is not available, click the action button of
Graph Metric will go to a non-existing Grafana page.

Added logic to hide the Graph Metric button when Grafana integration
is not avaialable. Also added unit tests for the changes.

Story: 2005906
Task: 34165

Change-Id: I617a0c609450bf015ddf6e98fd672723a2660071
2019-09-13 11:47:44 -07:00
Michał Piotrowski 9bb176fe2a Fix failing unit tests
Purpose of this commit is to overwrite Django settings of Horizon.
Horizon team decided to set debug flag to True, which causes problem in our tests.

Error occurs after this Horizon commit:
b0e9c3135c

Change-Id: I4d677bb4522e315ab2e4386193deb52a82d7645f
Story: 2005336
Task: 30274
2019-05-16 16:12:36 +02:00
Martin Chacon Piza f98f325fc2 Fix the partial missing metrics in Create Alarm Definition flow
- The UI will call the monasca-api more than once to get all
metrics when the limit of API is exceeded.
- Added compatibility to cassandra and influxdb

Change-Id: I15c53c05517a6f8eb0fc29f3adc3667485ee6772
Story: 2004430
Task: 28091
2018-11-28 22:56:30 +01:00
Zuul 7b9da968b4 Merge "Drop nose dependencies" 2018-11-19 14:29:52 +00:00
Zuul 8ee95c1196 Merge "Remove use_mox directive" 2018-11-19 14:29:52 +00:00
Adrian Czarnecki 8d07328c91 Replace @memoized_with_* with @memoized
@memoized_with_* was removed in [1]

[1] 123269dce7

Story: 2004175
Task: 27661
Change-Id: I39ff336b84448b231412a06e13aa876847453882
2018-10-25 12:53:17 +02:00
OpenStack Proposal Bot f137d1d926 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I7187b4e70faa2efe8c2676c637400690c61b1221
2018-10-22 07:04:06 +00:00
Adrian Czarnecki a22ccca580 Modify Kibana button to support events
Story: 2003458
Task: 27035

Change-Id: Iee497028b11565cd4eb1c98e8c42d1960a0b7ac8
2018-10-18 15:02:19 +02:00
Adrian Czarnecki 8d99e263a4 Py3: Fix overview alarms panel
Change-Id: Ic608f20ca52a5061c8e42ba17cad092d886abac7
2018-08-23 13:19:53 +02:00
Akihiro Motoki 4701b0f681 Drop nose dependencies
Horizon test setting no longer depends on nose and related stuffs.
This commit cleans up nose related dependencies.

django_nose is unnecessary in test/settings.py.
The related settings are dropped.

Change-Id: Ic8683e670f472079bfbe57e1cdd0f9105a358023
2018-08-17 01:59:02 +09:00
Chuck Short cc3e87b664 Remove use_mox directive
As of horizon 14.0.0.0b2 or later the use_mox directive is unecessary so we can remove it.

Change-Id: I5866a1b8618c6cd6389fce70ed8d519cd77d1075
2018-08-09 07:40:00 -04:00
OpenStack Proposal Bot 01ef5c2285 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib177f1b327d757b206dc5e19eb8e11c81e41ef16
2018-08-09 08:00:30 +00:00
Martin Chacon Piza c5f514815c Adding support to use grafana templating
Change-Id: I63302965cabb1deb0a1a74ca62f3e56bd04309b7
Story: 2002175
Task: 20041
2018-06-14 10:33:44 +02:00
Martin Chacon Piza 999bfa2a05 Support Django 2.0
Change-Id: I559cfece3e696a83eee3cb9aeec22b6b65d34bfc
story: 2002191
task: 20064
2018-06-12 10:38:30 +02:00
Ivan Kolodyazhny 5bf91e98d7 Rename test files to test_* pattern
We're going to switch to default Django test runner by default.
This patch renames test files to make tests descoverable by
Nose and Django test runners without addidional configuration.

Related blueprint: improve-horizon-testing

Change-Id: If4ee8dcd173c2f331bf34cf93c489029489c63ea
2018-06-04 13:24:10 +00:00
Martin Chacon Piza ba314e1368 Retrieve registers sorted by name
Change-Id: Ic4d08df18a96231f3132a89f9a1f1fb578a28994
Story: 2002112
Task: 19791
2018-05-28 11:16:07 +02:00
Zuul 181bcb1258 Merge "Fix Alarm status Panel on Overview page" 2018-05-11 08:40:47 +00:00
OpenStack Proposal Bot aadaea77d4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I268f2bb62787714263f99f741385d6cea66cfcab
2018-05-10 07:00:27 +00:00
Adrian Czarnecki 12fd9c0b87 Fix Alarm status Panel on Overview page
Fix problem with incorrect alarm status information for
multiple expressions alarm definition.

Story: 2001981
Task: 19592

Change-Id: Ie96c1be15f6b622f9be22dd1179fe7b4a73152b6
2018-05-08 11:41:07 +02:00
Zuul ff3d3167a1 Merge "Imported Translations from Zanata" 2018-04-25 08:33:41 +00:00
Zuul c067986b9e Merge "Modify policy configuration file" 2018-04-25 08:12:26 +00:00
OpenStack Proposal Bot 26eb8d4582 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I235e77bd01759837dd748109967491545d454da4
2018-04-25 07:17:34 +00:00
Zuul 483f360949 Merge "Change IntegerField to ChoiceField for notification period" 2018-04-24 12:41:00 +00:00
OpenStack Proposal Bot 9781a99bdc Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I5315a0a204526b8e02553a52e1010d7e292dbca0
2018-04-24 06:46:35 +00:00
Adrian Czarnecki ebe64e0b14 Modify policy configuration file
Only user with monasca-user role should have access to
monitoring panel.

Story: 2001895
Task: 14379
Depends-On: I16091dbd631a5e94d08598a23eeb3bdf97cf0a92
Change-Id: I79746010525784de4b66108e9d1fe749bd57675b
2018-04-23 13:37:48 +02:00
Zuul c403030311 Merge "Update pep8 checks" 2018-04-18 15:38:57 +00:00
Amir Mofakhar e609bd46b0 Update pep8 checks
* set the maximum line length to 100
* cleaned up the codes for pep8
* removed pep8 check ignores

Change-Id: I5d3e2f13117638b0a8af051b9faa64ce1a2dd04e
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
2018-04-18 16:09:26 +02:00
OpenStack Proposal Bot 0d774827ad Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I31b851cf8917fba56ed96abc86bacc9606d6b873
2018-04-18 06:51:59 +00:00