GutoVeronezi commented on a change in pull request #4862:
URL: https://github.com/apache/cloudstack/pull/4862#discussion_r600511819
##########
File path: ui/src/components/view/DetailsTab.vue
##########
@@ -33,6 +33,11 @@
<router-link :to="{ path: '/volume/' + volume.uuid }">{{
volume.type }} - {{ volume.path }}</router-link> ({{ parseFloat(volume.size /
(1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB)
</div>
</div>
+ <div v-else-if="$route.meta.name === 'computeoffering' && item ===
'rootdisksize'">
+ <div>
+ {{ parseFloat( resource.rootdisksize / (1024.0 * 1024.0 *
1024.0)).toFixed(1) }} GB
Review comment:
Suggestion:
I think it would be nice to us to have an utility that centralizes and
assures that we always do the same calculation.
@Pearl1594 do you think it would be possible to create an utility to
centralize these byte convertions? Like a `getGib(value = 1)` which return
`value * 1024 * 1024 * 1024` or `value * GiB` (GiB would be a constant = 1024 *
1024 * 1024).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]