From 6399990716dbfa25601aba49960e3f22e9f9cf94 Mon Sep 17 00:00:00 2001 From: Ivan Anfimov Date: Sat, 22 Mar 2025 07:58:45 +0000 Subject: [PATCH] Define measurement units for RAM and disk Change-Id: I1582515ba391c69d1a3f437b27ab31cde5f6f960 --- .../images/templates/images/images/_detail_overview.html | 4 ++-- .../workflow/launch-instance/source/source-details.html | 4 ++-- .../app/core/images/steps/edit-image/edit-image.html | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openstack_dashboard/dashboards/project/images/templates/images/images/_detail_overview.html b/openstack_dashboard/dashboards/project/images/templates/images/images/_detail_overview.html index 2d19c6f8e1..6700651789 100644 --- a/openstack_dashboard/dashboards/project/images/templates/images/images/_detail_overview.html +++ b/openstack_dashboard/dashboards/project/images/templates/images/images/_detail_overview.html @@ -48,11 +48,11 @@
{% trans "Disk Format" %}
{{ image.disk_format|default:_("None")|upper }}
{% if image.min_disk %} -
{% trans "Min Disk" %}
+
{% trans "Min. Disk (GB)" %}
{{ image.min_disk|diskgbformat }}
{% endif %} {% if image.min_ram %} -
{% trans "Min RAM" %}
+
{% trans "Min. RAM (MB)" %}
{{ image.min_ram|mb_float_format }}
{% endif %} diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source-details.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source-details.html index 399864a646..70942b7ca4 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source-details.html +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source-details.html @@ -1,12 +1,12 @@
-
Min Disk (GB)
+
Min. Disk (GB)
{$ (item.properties ? item.min_disk : item.volume_image_metadata.min_disk) || '--' $}
-
Min RAM (MB)
+
Min. RAM (MB)
{$ (item.properties ? item.min_ram : item.volume_image_metadata.min_ram) || '--' $}
diff --git a/openstack_dashboard/static/app/core/images/steps/edit-image/edit-image.html b/openstack_dashboard/static/app/core/images/steps/edit-image/edit-image.html index 46d4932274..fee5d26232 100644 --- a/openstack_dashboard/static/app/core/images/steps/edit-image/edit-image.html +++ b/openstack_dashboard/static/app/core/images/steps/edit-image/edit-image.html @@ -93,10 +93,10 @@ type="number" class="form-control" ng-required="true" ng-pattern="ctrl.validationRules.integer" ng-model="ctrl.image.min_disk" - placeholder="{$ 'The minimum disk size required to boot the image. If unspecified, this value defaults to 0 (no minimum).'|translate $}"> + placeholder="{$ 'The minimum disk (GB) size required to boot the image. If unspecified, this value defaults to 0 (no minimum).'|translate $}">

- min disk is required and must be an integer not less than 0 + The minimum disk (GB) is required and must be an integer not less than 0.

@@ -108,10 +108,10 @@ type="number" class="form-control" ng-required="true" ng-pattern="ctrl.validationRules.integer" ng-model="ctrl.image.min_ram" - placeholder="{$ 'The minimum memory size required to boot the image. If unspecified, this value defaults to 0 (no minimum).'|translate $}"> + placeholder="{$ 'The minimum memory (MB) size required to boot the image. If unspecified, this value defaults to 0 (no minimum).'|translate $}">

- min ram is required and must be an integer not less than 0 + The minimum memory (MB) is required and must be an integer not less than 0.