This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 7cfeab1a6b1 UI: Tooltip on the host information card to display the
CPU speed in MHz and the memory value in MB (to 3 decimal places) (#9971)
7cfeab1a6b1 is described below
commit 7cfeab1a6b178ee55096c6fec9e9f26f9db70357
Author: Layon <[email protected]>
AuthorDate: Mon Dec 2 06:01:57 2024 -0300
UI: Tooltip on the host information card to display the CPU speed in MHz
and the memory value in MB (to 3 decimal places) (#9971)
Co-authored-by: layon.oliveira <[email protected]>
---
ui/src/components/view/InfoCard.vue | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/ui/src/components/view/InfoCard.vue
b/ui/src/components/view/InfoCard.vue
index 98c26bf5565..6b42d68ddc3 100644
--- a/ui/src/components/view/InfoCard.vue
+++ b/ui/src/components/view/InfoCard.vue
@@ -180,7 +180,14 @@
<div class="resource-detail-item__label">{{ $t('label.cpu') }}</div>
<div class="resource-detail-item__details">
<appstore-outlined />
- <span v-if="'cpunumber' in resource && 'cpuspeed' in resource">{{
resource.cpunumber }} CPU x {{ parseFloat(resource.cpuspeed /
1000.0).toFixed(2) }} Ghz</span>
+ <span v-if="'cpunumber' in resource && 'cpuspeed' in resource">{{
resource.cpunumber }} CPU x {{ (resource.cpuspeed / 1000.0).toFixed(2) }} GHz
+ <a-tooltip placement="top">
+ <template #title>
+ {{ resource.cpuspeed }} MHz
+ </template>
+ <QuestionCircleOutlined />
+ </a-tooltip>
+ </span>
<span v-else>{{ resource.cputotal }}</span>
</div>
<div>
@@ -224,7 +231,16 @@
<div class="resource-detail-item" v-else-if="resource.memorytotalgb">
<div class="resource-detail-item__label">{{ $t('label.memory')
}}</div>
<div class="resource-detail-item__details">
- <bulb-outlined />{{ resource.memorytotalgb + ' ' +
$t('label.memory') }}
+ <bulb-outlined />
+ <span>
+ {{ resource.memorytotalgb + ' ' + $t('label.memory') }}
+ <a-tooltip placement="top">
+ <template #title>
+ {{ (resource.memorytotal/(1024**2)).toFixed(3) }} MB
+ </template>
+ <QuestionCircleOutlined />
+ </a-tooltip>
+ </span>
</div>
<div>
<span v-if="resource.memoryusedgb">