From 764ee30ecc2c508d985b3ff2ea15b0c47448c167 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 8 Jul 2022 20:00:04 +0530 Subject: [PATCH] ui: fix zone icon in vm deploy zone selection (#6543) * ui: fix zone icon in vm deploy zone selection Signed-off-by: Abhishek Kumar * unnecessary conditions Signed-off-by: Abhishek Kumar --- 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 28c9820bead..176c0c7ca8f 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 312860f993c..49554c699ba 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -45,12 +45,11 @@
- + :image="zoneItem.icon.base64image" + size="36" + style="marginTop: -30px; marginLeft: 60px" />
@@ -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