Skip to content

Commit f62b634

Browse files
authored
ui: correctly show volume physical size (#8119)
Fixes #8073 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 67cb9b9 commit f62b634

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

ui/src/components/view/ListView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
</template>
201201
<template #physicalsize="{ text }">
202202
<span v-if="text">
203-
{{ parseFloat(parseFloat(text) / 1024.0 / 1024.0 / 1024.0).toFixed(2) }} GiB
203+
{{ isNaN(text) ? text : (parseFloat(parseFloat(text) / 1024.0 / 1024.0 / 1024.0).toFixed(2) + ' GiB') }}
204204
</span>
205205
</template>
206206
<template #physicalnetworkname="{ text, record }">

ui/src/config/section/storage.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export default {
4242
const metricsFields = ['diskkbsread', 'diskkbswrite', 'diskiopstotal']
4343

4444
if (store.getters.userInfo.roletype === 'Admin') {
45-
metricsFields.push({
46-
physicalsize: (record) => {
47-
return record.physicalsize ? parseFloat(record.physicalsize / (1024.0 * 1024.0 * 1024.0)).toFixed(2) + 'GB' : ''
48-
}
49-
})
45+
metricsFields.push('physicalsize')
5046
}
5147
metricsFields.push('utilization')
5248

0 commit comments

Comments
 (0)