Commit Graph

101 Commits

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

Change-Id: Ie22aa21714bd35effb725ce67218bcd49b0b1d27
2022-08-22 04:09:51 +00:00
Pierre Riteau 6ce3faa7d3 Remove create_instance override
Horizon removed the Django-based implementation of launch instance [1]
which was overriden by cloudkitty-dashboard. Remove override to avoid
breaking Horizon when cloudkitty-dashboard is enabled.

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

Change-Id: Ib6516cfb4d9bbe75ddb62969f62629712afca38b
Story: 2009924
Task: 44788
2022-08-08 16:16:36 +02:00
Takashi Kajinami 696ab96b90 Replace deprecated ugettext_lazy
The ugettext_lazy method has been deprecated since Django 3.0[1].

This was already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3
[2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee

Change-Id: Ideeaff4a0bc43e69c7465f34062edc5e381932d5
2022-07-11 13:38:35 +09:00
Zuul 2f52d6d3c8 Merge "Convert project rating page to use v2 summary API" 2022-05-11 10:20:06 +00:00
manchandavishal 7ac2922dd5 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: I5086fe5fecd46e9e2ffb223b163fbaa8ed9c1970
2022-04-29 16:48:03 +05:30
Sam Morrison 15f5a7eae5 Convert project rating page to use v2 summary API
Use new response_format argument to get data in
a suitible format for horizon tables.

Change-Id: Icdc08d0719fd60c36c2b66926bf3e2ffe62f3afc
2022-03-25 14:15:03 +11:00
Rafael Weingärtner 4aa397d2d0 Remove the unused unicode
Change-Id: I4a9469833dd2e3fa878211d314a24b01b09cc616
2022-02-25 13:03:18 -03:00
wu.shiming d3fdbcdf60 Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Change-Id: I6a96d3ed3f046f87822c4cedaa51041885a2d3b6
2021-08-13 17:14:21 +08:00
Jonathan Herlin 19ead1f072 Respect endpoint type specified in Horizon
The CloudKitty dashboard now inherits the interface type from Horizon.
This allows for easier testing, like in an all-in-one to use the
internalURL.

Change-Id: I28d6d1ac1a9d8db4accc4cadc5da261cb86330fd
Story: 2008879
Task: 42424
2021-05-03 17:39:35 +02:00
Mariusz Karpiarz 1cf4c9534c Unstack series on the "Cost Per Service Per Hour" graph
By default series on the "Cost Per Service Per Hour" graph are stacked
together which means:

* all series have to have the same length, otherwise Rickshaw/D3 won't
  be able to stack them up;
* series are drawn one over another and since they are area graphs, this
  gives false impression of scale (series other than the first one will
  appear higher than what the scale on the Y axis suggests)

This change disables stacking of data series.

Story: 2008582
Task: 41735

Change-Id: I6aed92383a70f8dcf26c45155ef1d16169d40601
2021-02-08 16:09:44 +00:00
OpenStack Proposal Bot 3439344923 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I694eeaba80c2466c604077dd3012052828eb1fff
2020-10-04 06:14:06 +00:00
OpenStack Proposal Bot 01ac499997 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I420ebb515909ba345739497e7b09876165a225e8
2020-09-09 06:52:46 +00:00
manchandavishal 554068bb0e 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

Change-Id: I999c8fd4db3b8245f90e3e8f517af606c3b68aa7
2020-08-26 12:39:53 +00:00
jacky06 03cb12b999 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I5a4123c0c5e18c0e25383491253299fc5b54618b
2020-08-14 23:22:57 -03:00
Sean McGinnis 15a2a8e9e2
Drop use of third party mock
The third party mock library was needed for mocking support across py2
and py3. Now that we have dropped py2 support, we can use the standard
library unittest.mock instead.

Change-Id: I8b0db843743ba234f35f54e29ca820c909102059
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-13 09:57:44 -05:00
OpenStack Proposal Bot d4d2ddf4a5 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I1fa9967774b7e5f04957ff81488715155a94170b
2019-11-18 08:48:32 +00:00
OpenStack Proposal Bot 945ce26bd1 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6b2a3d98660f1302612a8e52425aaaf4d827fbbd
2019-09-27 06:08:17 +00:00
pengyuesheng 7258039262 Add exception to error messages
Change-Id: I5c4bdee02ba898e22ee72d78c27b1f42296896ff
2019-09-11 09:54:13 +08:00
Luka Peschke fb168515d9 Adapt TemplatizableDict to python3 hasattr
In python 3, hasattr() expects __getattr__ to raise an AttributeError if
the attribute does not exist. This updates TemplatizableDict accordingly.

Change-Id: I989b5c5d8888bce47fa8c8d7157097d3ea48e0b5
2019-07-25 17:36:16 +02:00
Zuul 3bcc59c36b Merge "Add a check to custom_service on CreateServiceForm" 2019-06-27 15:32:47 +00:00
pengyuesheng c36032ac62 Add a check to custom_service on CreateServiceForm
Change-Id: Ib10b8e46dd7733eb2357aca47d8112f50dd3e42f
2019-06-13 11:23:24 +08:00
pengyuesheng 7212c0b409 Add success and error messages on some forms
On some forms, after the operation succeeds or fails,
no prompt message is displayed.

This patch add success and error messages on some forms

Change-Id: I07832b79b02871d5e6c8422ea91a7a6f11ae8137
2019-06-12 10:32:35 +08:00
Zuul c827cfa5fb Merge "Add asterisk mark for the required field on CreateScriptForm" 2019-06-11 09:51:38 +00:00
pengyuesheng 958202bd4f Add success and error messages on some forms
On some forms, after the operation succeeds or fails,
no prompt message is displayed.

This patch add success and error messages on some forms

Change-Id: Ibf031845dd4d30221f45b7501342c22a0c3ccd79
2019-06-11 16:13:40 +08:00
pengyuesheng 0ab61d47f9 Add asterisk mark for the required field on CreateScriptForm
Change-Id: I343855dc3eb8f7ad01b8e0b59a71d6f86fa93e48
2019-06-10 10:32:08 +08:00
pengyuesheng 43db711cdb Add asterisk mark for the required field on CreateServiceForm
service_name is required according to code of cloudkittyclient
Depend-On: d2fb83e64c/cloudkittyclient/v1/rating/hashmap.py (L49-L50)

Change-Id: Id534f5ab6e883672c72ea07a5f3b5f556a8d74b4
2019-06-04 13:25:28 +08:00
Luka Peschke 79d1da08cd Update the predictive pricing
This updates the predictive pricing of the horizon dashboard. Work items:

* The "flavor" field has been changed to "flavor_name" in order
  to match gnocchi.

* It is now possible to specify the hashmap service to use for predictive
  pricing through the "CLOUDKITTY_QUOTATION_SERVICE".

* The hashmap service used for quotation does now default to "instance"
  instead of "compute".

Change-Id: Ice42fc1687ade87c2a4690e3e52782ecbf7f0ee3
2019-03-27 15:33:23 +01:00
François Magimel 18b013e79e Use XStatic packages instead of JS files
Replaces D3 and Rickshaw js files with their respective XStatic packages.

Change-Id: I2c4868a08ed5591a16bff8b1de3e6593f047a1c3
Story: 2003578
Task: 24922
2019-03-21 16:48:15 +01:00
Zuul 410ed58cdd Merge "Rework the "reporting" tab" 2019-03-21 14:13:29 +00:00
Luka Peschke 9802b37a7b Rework the "reporting" tab
This is a rework of the Project/Reporting tag. Its main goal
is to draw the "Cumulative cost repartition" piechart without D3pie,
in order to get rid of that dependency.

Work items:

* Remove d3pie dependency, and replace the piechart by a D3-only donut.

* Use consistent colors between the piechart and time chart.

* Add a color legend.

Change-Id: Ie2207be3c027b6042251fbcb7d93a3cd5455ad3d
Story: 2003578
Task: 24923
2019-03-21 14:34:40 +01:00
Luka Peschke 2cff4cb554 Import reverse from django.urls rather than django.core.urlresolvers
Starting with Django 2 (which is the python3 version), the reverse and
reverse_lazy functions are located in the django.urls module rather than
django.core.urlresolvers. In Django>=1.10 (horizon depends on 1.11), these
functions are available in django.urls. This commit aims at improving the
python3 compatibility.

Change-Id: I8e8d281c7cac21c4b5771d2430f7d376b7e8c46a
2019-02-01 11:39:32 +01:00
Luka Peschke 3e33fddff0 Explicitly specify the region_name when instanciating a client
Until now, the region_name was not specified when instanciating
cloudkittyclient from the horizon dashboard. This caused the
client to use systematically use the default region. That
behavior was problematic in multi-region setups, as only the
cloudkitty API of the default region could be reached.

Change-Id: Ibb399a0b5b96aa808b0bbb7a5a82dd4d8a948063
2019-01-09 15:49:02 +01:00
Zuul aa0bb413b4 Merge "Add missing JS source" 2019-01-07 10:26:51 +00:00
OpenStack Proposal Bot ceaeff99bc Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3bd124499029f5cd5c792260fb48c509ff8bcd2e
2018-12-27 08:15:27 +00:00
Thomas Goirand 1fde6e4f64 Add missing JS source
cloudkitty-dashboard, so far, doesn't have sourcefull versions of JS files.
This makes the whole package non-free.

This is also quite dangerous, because there's no way to track version
of included javascript, leading to potential security hole disaster.

First step is to re-add the source file. Next step will probably be to
use XStatic packages.

This patch partially addresses:
https://storyboard.openstack.org/#!/story/2003578

but cannot claim to actually fix it. The proper fix would be XStatic.

Story: 2003578
Task: 24924
Change-Id: I02738e95a04bfb497c3bcc99fc7d4765bf23a67d
2018-11-15 14:00:30 +01:00
Jeremy Liu c00e762602 Add testcases for cloudkitty-dashboard
Add a testcase for testing rating/reporting panel registration.

Change-Id: Iafbe3968ee7d4bdf90dce9b23ec481d7c816ddc5
2018-10-23 13:36:34 +02:00
Zuul d69272525d Merge "Add the missing name in confirm delete modal" 2018-09-24 08:02:45 +00:00
Qian Min Chen 0aa562ae82 Add the missing name in confirm delete modal
Closes-bug: #1793874

Change-Id: Ia4e0dbc4035fcd30a5c6455fa0307004d1e574d3
2018-09-22 11:03:15 +00:00
Zuul 942601affc Merge "Add the correct icon for the create action in table" 2018-09-20 11:54:37 +00:00
OpenStack Proposal Bot c7f7f165a8 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib41a77de506cb2b860d794b740c92e9094938c7e
2018-09-13 07:00:01 +00:00
Zuul fb0da5c041 Merge "Add support for OPENSTACK_SSL_{CACERT,NO_VERIFY}" 2018-09-12 09:01:58 +00:00
Zuul 836adf1733 Merge "Add templates for modal forms" 2018-09-07 09:36:39 +00:00
Zuul 46544d378c Merge "Improve CloudKitty's dashboard" 2018-09-07 09:36:39 +00:00
Zuul de18dbb854 Merge "Fix some typo in translatable strings" 2018-09-07 09:25:56 +00:00
Zuul 21a24d6fd5 Merge "Remove the unused attributes in the tables" 2018-09-07 09:17:43 +00:00
Luka Peschke b7304ab60c Improve CloudKitty's dashboard
Work items:

     - The "Project/Rating" tab has been improved: it does now provide a total
       by metric type. This make use of the /summary endpoint instead of /total
       (/total is deprecated).

     - An "Admin/Rating Summary" tab has been added. An admin user can now have
       the cost of every rated tenant at once. By clicking on a tenant, a
       per-resource total for the given tenant can be obtained (this view is
       similar to the "Project/Rating" tab). A per-resource total for the whole
       cloud is also available.

Change-Id: I13b9ba9e04a330ec216378258ad024c8651f6ff5
2018-09-07 07:28:16 +00:00
Luka Peschke 6ac7b2e7f1 Add support for OPENSTACK_SSL_{CACERT,NO_VERIFY}
This adds support for the both options mentionned in the title. The ca
certificate was wrongfully passed to keystoneauth through the 'cert' parameter,
which is meant for the client certificate.

Change-Id: I9a6759a8546a235975177bbea59334aa23f99328
Story: 2003689
Task: 26223
Depends-On: https://review.openstack.org/#/c/600510/
2018-09-06 20:59:51 +02:00
François Magimel b7afddc6ce Add templates for modal forms
Modal forms need to use templates which extend the default modal form
template of Horizon.
New templates have a description paragraph too.

Task: 23260
Story: 2003138
Closes-Bug: 1749249
Change-Id: Ia2451892d5bf84e1a4bdfea808b9275cba669a17
2018-08-15 17:47:43 +02:00
François Magimel ad0033db12 Fix some typo in translatable strings
In one string, a letter was missing. And in another one, the word order
was reversed.

Change-Id: I3046275414f4a09ff3954c3ca4b0a1bbc728b4e1
2018-08-10 23:59:18 +02:00
OpenStack Proposal Bot 0713926424 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I1cb827b059dace47b20499278c0a59549a9a73f2
2018-08-10 07:39:51 +00:00