This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new f62b6340334 ui: correctly show volume physical size (#8119)
f62b6340334 is described below

commit f62b63403341d109836df28b11d86138669dfdff
Author: Abhishek Kumar <[email protected]>
AuthorDate: Thu Oct 19 15:58:58 2023 +0530

    ui: correctly show volume physical size (#8119)
    
    Fixes #8073
    
    Signed-off-by: Abhishek Kumar <[email protected]>
---
 ui/src/components/view/ListView.vue | 2 +-
 ui/src/config/section/storage.js    | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/ui/src/components/view/ListView.vue 
b/ui/src/components/view/ListView.vue
index 38b8b519138..abb62b345bc 100644
--- a/ui/src/components/view/ListView.vue
+++ b/ui/src/components/view/ListView.vue
@@ -200,7 +200,7 @@
     </template>
     <template #physicalsize="{ text }">
       <span v-if="text">
-        {{ parseFloat(parseFloat(text) / 1024.0 / 1024.0 / 1024.0).toFixed(2) 
}} GiB
+        {{ isNaN(text) ? text : (parseFloat(parseFloat(text) / 1024.0 / 1024.0 
/ 1024.0).toFixed(2) + ' GiB') }}
       </span>
     </template>
     <template #physicalnetworkname="{ text, record }">
diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js
index 920cdb5bbb6..1cf31350fb2 100644
--- a/ui/src/config/section/storage.js
+++ b/ui/src/config/section/storage.js
@@ -42,11 +42,7 @@ export default {
         const metricsFields = ['diskkbsread', 'diskkbswrite', 'diskiopstotal']
 
         if (store.getters.userInfo.roletype === 'Admin') {
-          metricsFields.push({
-            physicalsize: (record) => {
-              return record.physicalsize ? parseFloat(record.physicalsize / 
(1024.0 * 1024.0 * 1024.0)).toFixed(2) + 'GB' : ''
-            }
-          })
+          metricsFields.push('physicalsize')
         }
         metricsFields.push('utilization')
 

Reply via email to