Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,7 @@
"label.rolename": "Role",
"label.roles": "Roles",
"label.roletype": "Role Type",
"label.rootdisksize": "Root disk size (GB)",
"label.root.certificate": "Root certificate",
"label.root.disk.offering": "Root Disk Offering",
"label.root.disk.size": "Root disk size (GB)",
Expand Down
5 changes: 5 additions & 0 deletions ui/src/components/view/DetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.. I can do that. Thanks @GutoVeronezi

</div>
</div>
<div v-else-if="['name', 'type'].includes(item)">
<span v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(resource[item])">{{ $t(resource[item].toLowerCase()) }}</span>
<span v-else>{{ resource[item] }}</span>
Expand Down
4 changes: 4 additions & 0 deletions ui/src/config/section/offering.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default {
store.getters.apis.createServiceOffering.params.filter(x => x.name === 'storagepolicy').length > 0) {
fields.splice(6, 0, 'vspherestoragepolicy')
}
if (store.getters.apis.createServiceOffering &&
store.getters.apis.createServiceOffering.params.filter(x => x.name === 'rootdisksize').length > 0) {
fields.splice(12, 0, 'rootdisksize')
}
return fields
},
related: [{
Expand Down