ui: correctly show volume physical size (#8119)

Fixes #8073

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2023-10-19 15:58:58 +05:30 committed by GitHub
parent 67cb9b9e40
commit f62b634033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -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 }">

View File

@ -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')