From 8f9aa0be0d355167f64037bc2f2a6c7aa57c136b Mon Sep 17 00:00:00 2001 From: Dmitriy Chubinidze Date: Fri, 22 Aug 2025 11:03:12 +0000 Subject: [PATCH 1/6] Update group description in help text Update help text to more clearly explain how they can be used to organize mapping calculations. Change-Id: I5e4e071651d49b7d28fde5b8bce01e9f95052e56 Signed-off-by: Dmitriy Chubinidze --- .../admin/hashmap/templates/hashmap/_group_create.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_group_create.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_group_create.html index 8db7b96..e46197d 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_group_create.html +++ b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_group_create.html @@ -3,5 +3,11 @@ {% block modal-body-right %}

{% trans "Description:" %}

-

{% trans "A group is a way to group calculations of mappings." %}

+

{% blocktrans trimmed %} + A group lets you organize mapping calculations into separate sets. + For example, you might create one group with rules for rating instance uptime + and another for evaluating block storage volumes. Keeping them in separate + groups ensures the calculations remain independent and don’t interfere + with each other. + {% endblocktrans %}

{% endblock %} From 88018d912117719e6049ac08867a90534862c6bf Mon Sep 17 00:00:00 2001 From: Dmitriy Chubinidze Date: Fri, 22 Aug 2025 15:16:53 +0000 Subject: [PATCH 2/6] Align labels and values on a single line in Details templates Update details page to display each label and value on the same line using a grid layout for more readability. Change-Id: I301565b7fc5d2621a1217a2cd4be871a5b6f46ba Signed-off-by: Dmitriy Chubinidze --- .../admin/hashmap/templates/hashmap/group_details.html | 10 +++++----- .../modules/templates/rating_modules/details.html | 2 +- .../admin/pyscripts/templates/pyscripts/details.html | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/group_details.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/group_details.html index 533358e..2b77b99 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/group_details.html +++ b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/group_details.html @@ -6,7 +6,7 @@
-
+
{% trans "Id" %}
{{ group.group_id }}
{% trans "Name" %}
@@ -18,7 +18,7 @@

{% trans "Mappings" %}

{% if mappings.services %}

{% trans "Services" %}

{% for service in mappings.services %} -
+
{% trans "Mapping ID" %}
{{ service.mapping_id }}
{% trans "Service ID" %}
@@ -33,7 +33,7 @@

{% trans "Services" %}

{% if mappings.fields %}

{% trans "Fields" %}

{% for field in mappings.fields %} -
+
{% trans "Mapping ID" %}
{{ field.mapping_id }}
{% trans "Field ID" %}
@@ -53,7 +53,7 @@

{% trans "Thresholds" %}

{% if thresholds.services %}

{% trans "Services" %}

{% for service in thresholds.services %} -
+
{% trans "Service ID" %}
{{ service.service_id }}
{% trans "Level" %}
@@ -68,7 +68,7 @@

{% trans "Services" %}

{% if thresholds.fields %}

{% trans "Fields" %}

{% for field in thresholds.fields %} -
+
{% trans "Field ID" %}
{{ field.field_id }}
{% trans "Level" %}
diff --git a/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/details.html b/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/details.html index 45e2063..4cf7ffc 100644 --- a/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/details.html +++ b/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/details.html @@ -6,7 +6,7 @@
-
+
{% trans "Id" %}
{{ module.module_id }}
{% trans "Description" %}
diff --git a/cloudkittydashboard/dashboards/admin/pyscripts/templates/pyscripts/details.html b/cloudkittydashboard/dashboards/admin/pyscripts/templates/pyscripts/details.html index 636d0bb..539ba92 100644 --- a/cloudkittydashboard/dashboards/admin/pyscripts/templates/pyscripts/details.html +++ b/cloudkittydashboard/dashboards/admin/pyscripts/templates/pyscripts/details.html @@ -6,7 +6,7 @@
-
+
{{ _("Id") }}
{{ script.script_id }}
{{ _("Name") }}
From dd10c17035720aa34730a027d34b7468d7b1d951 Mon Sep 17 00:00:00 2001 From: Ivan Anfimov Date: Mon, 25 Aug 2025 01:04:37 +0000 Subject: [PATCH 3/6] Fix mistakes in phrases Change-Id: I3d648e6670ff211bdaf110edace4cba6b11d0dd7 Signed-off-by: Ivan Anfimov --- .../admin/hashmap/templates/hashmap/_field_create.html | 2 +- .../admin/hashmap/templates/hashmap/service_details.html | 8 +++++--- cloudkittydashboard/dashboards/admin/hashmap/views.py | 4 ++-- .../modules/templates/rating_modules/_priority_edit.html | 2 +- cloudkittydashboard/dashboards/admin/pyscripts/views.py | 2 +- cloudkittydashboard/dashboards/admin/summary/views.py | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_field_create.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_field_create.html index 97186bb..c2df6c9 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_field_create.html +++ b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_field_create.html @@ -3,5 +3,5 @@ {% block modal-body-right %}

{% trans "Description:" %}

-

{% trans "A field is referring to a metadata field of a resource. " %}

+

{% trans "A field is referring to a metadata field of a resource." %}

{% endblock %} diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/service_details.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/service_details.html index 6573875..8f55014 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/service_details.html +++ b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/service_details.html @@ -7,9 +7,11 @@
{% if service_period %} - {% blocktrans with service_period as period %} -

Usage data are collected every {{ period }} seconds.

- {% endblocktrans %} +

+ {% blocktrans trimmed with service_period as period %} + Usage data is collected every {{ period }} seconds. + {% endblocktrans %} +

{% endif %} {{ tab_group.render }} diff --git a/cloudkittydashboard/dashboards/admin/hashmap/views.py b/cloudkittydashboard/dashboards/admin/hashmap/views.py index be026be..f65c48a 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/views.py +++ b/cloudkittydashboard/dashboards/admin/hashmap/views.py @@ -189,8 +189,8 @@ def get_success_url(self, **kwargs): class FieldMappingCreateView(forms.ModalFormView): form_class = hashmap_forms.CreateFieldMappingForm form_id = "create_field_mapping" - modal_header = _("Create Field Mapping") - page_title = _("Create field Mapping") + modal_header = _("Create field mapping") + page_title = _("Create field mapping") template_name = 'admin/hashmap/mapping_create.html' submit_url = 'horizon:admin:hashmap:field_mapping_create' success_url = 'horizon:admin:hashmap:field_mapping_create' diff --git a/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/_priority_edit.html b/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/_priority_edit.html index 704ca0e..c3983f3 100644 --- a/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/_priority_edit.html +++ b/cloudkittydashboard/dashboards/admin/modules/templates/rating_modules/_priority_edit.html @@ -4,7 +4,7 @@ {% block modal-body-right %}

{% trans "Description:" %}

- {% blocktrans with module_id=module_id %} + {% blocktrans trimmed with module_id=module_id %} Edit the priority for the {{ module_id }} module. {% endblocktrans %}

diff --git a/cloudkittydashboard/dashboards/admin/pyscripts/views.py b/cloudkittydashboard/dashboards/admin/pyscripts/views.py index 64ecdd5..62b7e60 100644 --- a/cloudkittydashboard/dashboards/admin/pyscripts/views.py +++ b/cloudkittydashboard/dashboards/admin/pyscripts/views.py @@ -81,7 +81,7 @@ def get_success_url(self, **kwargs): class ScriptDetailsView(views.APIView): template_name = 'admin/pyscripts/details.html' - page_title = _("Script Details : {{ script.name }}") + page_title = _("Script details: {{ script.name }}") def get_data(self, request, context, *args, **kwargs): script_id = kwargs.get("script_id") diff --git a/cloudkittydashboard/dashboards/admin/summary/views.py b/cloudkittydashboard/dashboards/admin/summary/views.py index 7870d8b..1ad29f6 100644 --- a/cloudkittydashboard/dashboards/admin/summary/views.py +++ b/cloudkittydashboard/dashboards/admin/summary/views.py @@ -55,7 +55,7 @@ def get_data(self): class TenantDetailsView(tables.DataTableView): template_name = 'admin/rating_summary/details.html' table_class = sum_tables.TenantSummaryTable - page_title = _("Script Details : {{ table.project_id }}") + page_title = _("Script details: {{ table.project_id }}") def _get_cloud_total_summary(self): return api.cloudkittyclient(self.request).report.get_summary( From 2e6914822d026d8a441815052b323e911b93d1bb Mon Sep 17 00:00:00 2001 From: Ivan Anfimov Date: Fri, 12 Sep 2025 13:23:10 +0000 Subject: [PATCH 4/6] Migrate setup configuration to pyproject.toml Change-Id: I43861e77aeffd66b7f12e6ea8f07d235e0b032b3 Co-authored-by: Stephen Finucane Signed-off-by: Ivan Anfimov --- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++++++ setup.cfg | 25 ------------------------- 2 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..15d5ff2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[build-system] +requires = ["pbr>=6.1.1"] +build-backend = "pbr.build" + +[project] +name = "cloudkitty-dashboard" +description = "CloudKitty Horizon dashboard" +authors = [ + {name = "OpenStack", email = "openstack-discuss@lists.openstack.org"}, +] +readme = {file = "README.rst", content-type = "text/x-rst"} +license = {text = "Apache-2.0"} +dynamic = ["version", "dependencies"] +requires-python = ">=3.10" +classifiers = [ + "Environment :: OpenStack", + "Intended Audience :: Information Technology", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", +] + +[project.urls] +Homepage = "https://docs.openstack.org/cloudkitty-dashboard/latest/" +Repository = "https://opendev.org/openstack/cloudkitty-dashboard" + +[tool.setuptools] +packages = [ + "cloudkittydashboard" +] diff --git a/setup.cfg b/setup.cfg index 2906adb..3217642 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,27 +1,2 @@ [metadata] name = cloudkitty-dashboard -summary = CloudKitty Horizon dashboard -description_file = - README.rst -author = OpenStack -author_email = openstack-discuss@lists.openstack.org -home_page = https://docs.openstack.org/cloudkitty-dashboard/latest/ -python_requires = >=3.10 -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: 3.13 - -[files] -packages = - cloudkittydashboard From 17c77e82a0c1228e7cdcfe24b714df441ea3f078 Mon Sep 17 00:00:00 2001 From: OpenStack Proposal Bot Date: Tue, 25 Nov 2025 03:25:28 +0000 Subject: [PATCH 5/6] Imported Translations from Zanata For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I36fdb172f72c5443c0c12724a164506d928e9afe Signed-off-by: OpenStack Proposal Bot Generated-By: openstack/openstack-zuul-jobs:roles/prepare-zanata-client/files/common_translation_update.sh --- .../locale/en_GB/LC_MESSAGES/django.po | 40 +--------------- .../locale/fr/LC_MESSAGES/django.po | 41 +--------------- .../locale/ru/LC_MESSAGES/django.po | 47 ++++--------------- 3 files changed, 11 insertions(+), 117 deletions(-) diff --git a/cloudkittydashboard/locale/en_GB/LC_MESSAGES/django.po b/cloudkittydashboard/locale/en_GB/LC_MESSAGES/django.po index ea67355..4632258 100644 --- a/cloudkittydashboard/locale/en_GB/LC_MESSAGES/django.po +++ b/cloudkittydashboard/locale/en_GB/LC_MESSAGES/django.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: cloudkitty-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" -"POT-Creation-Date: 2025-08-07 10:33+0000\n" +"POT-Creation-Date: 2025-11-24 11:31+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -16,35 +16,9 @@ msgstr "" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#, python-format -msgid "" -"\n" -" Edit the priority for the %(module_id)s module.\n" -" " -msgstr "" -"\n" -" Edit the priority for the %(module_id)s module.\n" -" " - -#, python-format -msgid "" -"\n" -"

Usage data are collected every %(period)s seconds.

\n" -" " -msgstr "" -"\n" -"

Usage data are collected every %(period)s seconds.

\n" -" " - msgid "$" msgstr "$" -msgid "A field is referring to a metadata field of a resource. " -msgstr "A field is referring to a metadata field of a resource. " - -msgid "A group is a way to group calculations of mappings." -msgstr "A group is a way to group calculations of mappings." - msgid "A mapping is the final object, it’s what triggers calculation." msgstr "A mapping is the final object, it’s what triggers calculation." @@ -76,9 +50,6 @@ msgstr "Cost Per Service Per Hour" msgid "Create Field" msgstr "Create Field" -msgid "Create Field Mapping" -msgstr "Create Field Mapping" - msgid "Create Field Threshold" msgstr "Create Field Threshold" @@ -100,9 +71,6 @@ msgstr "Create Service Threshold" msgid "Create a new rating script." msgstr "Create a new rating script." -msgid "Create field Mapping" -msgstr "Create field Mapping" - msgid "Create new Field" msgstr "Create new Field" @@ -400,12 +368,6 @@ msgstr "Script Data" msgid "Script Details" msgstr "Script Details" -msgid "Script Details : {{ script.name }}" -msgstr "Script Details : {{ script.name }}" - -msgid "Script Details : {{ table.project_id }}" -msgstr "Script Details : {{ table.project_id }}" - msgid "Script File" msgstr "Script File" diff --git a/cloudkittydashboard/locale/fr/LC_MESSAGES/django.po b/cloudkittydashboard/locale/fr/LC_MESSAGES/django.po index bb8ba84..c6c8a22 100644 --- a/cloudkittydashboard/locale/fr/LC_MESSAGES/django.po +++ b/cloudkittydashboard/locale/fr/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: cloudkitty-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" -"POT-Creation-Date: 2022-08-08 15:59+0000\n" +"POT-Creation-Date: 2025-11-24 11:31+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -14,37 +14,10 @@ msgstr "" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -#, python-format -msgid "" -"\n" -" Edit the priority for the %(module_id)s module.\n" -" " -msgstr "" -"\n" -" Éditer la priorité pour le module %(module_id)s.\n" -" " - -#, python-format -msgid "" -"\n" -"

Usage data are collected every %(period)s seconds.

\n" -" " -msgstr "" -"\n" -"

Les données d'utilisation sont collectées toutes %(period)s secondes.\n" -" " - #, fuzzy msgid "$" msgstr "€" -msgid "A field is referring to a metadata field of a resource. " -msgstr "Un champ fait référence à un champ de métadonnées d'une ressource." - -msgid "A group is a way to group calculations of mappings." -msgstr "Un groupe permet de regrouper les calculs propres à des mappings." - msgid "A mapping is the final object, it’s what triggers calculation." msgstr "Un mapping est l'objet final : c'est ce qui déclenche le calcul." @@ -65,9 +38,6 @@ msgstr "Coût par service par heure" msgid "Create Field" msgstr "Créer un champ" -msgid "Create Field Mapping" -msgstr "Créer un mapping du champ" - msgid "Create Field Threshold" msgstr "Créer un seuil du champ" @@ -86,9 +56,6 @@ msgstr "Créer un service" msgid "Create Service Threshold" msgstr "Créer un seuil du service" -msgid "Create field Mapping" -msgstr "Créer un mapping du champ" - msgid "Create new Field" msgstr "Créer un nouveau champ" @@ -344,12 +311,6 @@ msgstr "Données du script" msgid "Script Details" msgstr "Détails du script" -msgid "Script Details : {{ script.name }}" -msgstr "Détails du script : {{ script.name }}" - -msgid "Script Details : {{ table.project_id }}" -msgstr "Détails du script : {{ table.project_id }}" - #, fuzzy msgid "Script File" msgstr "Fichier (script)" diff --git a/cloudkittydashboard/locale/ru/LC_MESSAGES/django.po b/cloudkittydashboard/locale/ru/LC_MESSAGES/django.po index 0ae836d..db1d86e 100644 --- a/cloudkittydashboard/locale/ru/LC_MESSAGES/django.po +++ b/cloudkittydashboard/locale/ru/LC_MESSAGES/django.po @@ -4,11 +4,11 @@ msgid "" msgstr "" "Project-Id-Version: cloudkitty-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" -"POT-Creation-Date: 2025-08-26 13:56+0000\n" +"POT-Creation-Date: 2025-11-24 11:31+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2025-08-26 07:18+0000\n" +"PO-Revision-Date: 2025-11-24 11:30+0000\n" "Last-Translator: Ivan Anfimov \n" "Language-Team: Russian\n" "Language: ru\n" @@ -16,35 +16,9 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#, python-format -msgid "" -"\n" -" Edit the priority for the %(module_id)s module.\n" -" " -msgstr "" -"\n" -" Изменить приоритет для модуля %(module_id)s.\n" -" " - -#, python-format -msgid "" -"\n" -"

Usage data are collected every %(period)s seconds.

\n" -" " -msgstr "" -"\n" -"

Данные о потреблении собираются каждые %(period)s сек..

\n" -" " - msgid "$" msgstr "$" -msgid "A field is referring to a metadata field of a resource. " -msgstr "Поле ссылается на поле метаданных ресурса." - -msgid "A group is a way to group calculations of mappings." -msgstr "Группа — это способ группировки вычисления сопоставлений." - msgid "A mapping is the final object, it’s what triggers calculation." msgstr "Сопоставление — это конечный объект, именно он запускает расчет." @@ -79,9 +53,6 @@ msgstr "Стоимость услуги в час" msgid "Create Field" msgstr "Создать поле" -msgid "Create Field Mapping" -msgstr "Создать сопоставление поля" - msgid "Create Field Threshold" msgstr "Создать порог поля" @@ -103,7 +74,7 @@ msgstr "Создать порог услуги" msgid "Create a new rating script." msgstr "Создать новый скрипт оценки." -msgid "Create field Mapping" +msgid "Create field mapping" msgstr "Создать сопоставление поля" msgid "Create new Field" @@ -428,18 +399,18 @@ msgstr "Данные скрипта" msgid "Script Details" msgstr "Подробности скрипта" -msgid "Script Details : {{ script.name }}" -msgstr "Подробности скрипта : {{ script.name }}" - -msgid "Script Details : {{ table.project_id }}" -msgstr "Подробности скрипта : {{ table.project_id }}" - msgid "Script File" msgstr "Файл скрипта" msgid "Script ID" msgstr "ID скрипта" +msgid "Script details: {{ script.name }}" +msgstr "Подробности скрипта: {{ script.name }}" + +msgid "Script details: {{ table.project_id }}" +msgstr "Подробности скрипта: {{ table.project_id }}" + msgid "Service" msgstr "Услуга" From 05af20c02e596599ecd8e15403ca6eed99039fd8 Mon Sep 17 00:00:00 2001 From: Dmitriy Chubinidze Date: Tue, 25 Nov 2025 09:49:38 +0000 Subject: [PATCH 6/6] Reword config text to avoid Unicode apostrophe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the contraction in the configuration file to remove the Unicode apostrophe to get rid of Gitea’s “confusable characters” warning when opening the file. Change-Id: I7c3c7503621c40d3f80f07c14f31b9d0c6583ad7 Signed-off-by: Dmitriy Chubinidze --- .../admin/hashmap/templates/hashmap/_mapping_create.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_mapping_create.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_mapping_create.html index ec01ae4..7d91928 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_mapping_create.html +++ b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/_mapping_create.html @@ -3,5 +3,5 @@ {% block modal-body-right %}

{% trans "Description:" %}

-

{% trans "A mapping is the final object, it’s what triggers calculation." %}

+

{% trans "A mapping is the final object that triggers calculation." %}

{% endblock %}