You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/07/08 14:30:11 UTC
[cloudstack] branch 4.17 updated: ui: fix zone icon in vm deploy zone selection (#6543)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new 764ee30ecc ui: fix zone icon in vm deploy zone selection (#6543)
764ee30ecc is described below
commit 764ee30ecc2c508d985b3ff2ea15b0c47448c167
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Fri Jul 8 20:00:04 2022 +0530
ui: fix zone icon in vm deploy zone selection (#6543)
* ui: fix zone icon in vm deploy zone selection
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
* unnecessary conditions
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
ui/src/components/view/ResourceIcon.vue | 4 ++++
ui/src/views/compute/DeployVM.vue | 12 ++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ui/src/components/view/ResourceIcon.vue b/ui/src/components/view/ResourceIcon.vue
index 28c9820bea..176c0c7ca8 100644
--- a/ui/src/components/view/ResourceIcon.vue
+++ b/ui/src/components/view/ResourceIcon.vue
@@ -43,6 +43,10 @@ export default {
}
},
getDimensions () {
+ const num = Number(this.size)
+ if (Number.isInteger(num) && num > 0) {
+ return num
+ }
switch (this.size) {
case '4x':
return 56
diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index 312860f993..49554c699b 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -45,12 +45,11 @@
<a-card-grid style="width:200px;" :title="zoneItem.name" :hoverable="false">
<a-radio :value="zoneItem.id">
<div>
- <img
+ <resource-icon
v-if="zoneItem && zoneItem.icon && zoneItem.icon.base64image"
- :src="getImg(zoneItem.icon.base64image)"
- style="marginTop: -30px; marginLeft: 60px"
- width="36px"
- height="36px" />
+ :image="zoneItem.icon.base64image"
+ size="36"
+ style="marginTop: -30px; marginLeft: 60px" />
<global-outlined v-else :style="{fontSize: '36px', marginLeft: '60px', marginTop: '-40px'}"/>
</div>
</a-radio>
@@ -1487,9 +1486,6 @@ export default {
'maxmemory' in serviceOffering.serviceofferingdetails && 'maxcpunumber' in serviceOffering.serviceofferingdetails &&
'minmemory' in serviceOffering.serviceofferingdetails
},
- getImg (image) {
- return 'data:image/png;charset=utf-8;base64, ' + image
- },
updateOverrideRootDiskShowParam (val) {
if (val) {
this.showRootDiskSizeChanger = false