Skip to content

Commit 71a1222

Browse files
committed
AS UI: apply patches for DeployVm.vue on CreateAutoScaleVmGroup.vue
ui: fix zone icon in vm deploy zone selection (#6543) ui: remove incorrect API calls when initializing the deploy VM page (#6687) ui: Fix netowrkid not passed in deployvm (#6711)
1 parent 34deff7 commit 71a1222

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

ui/src/views/compute/CreateAutoScaleVmGroup.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@
4545
<a-card-grid style="width:200px;" :title="zoneItem.name" :hoverable="false">
4646
<a-radio :value="zoneItem.id">
4747
<div>
48-
<img
48+
<resource-icon
4949
v-if="zoneItem && zoneItem.icon && zoneItem.icon.base64image"
50-
:src="getImg(zoneItem.icon.base64image)"
51-
style="marginTop: -30px; marginLeft: 60px"
52-
width="36px"
53-
height="36px" />
50+
:image="zoneItem.icon.base64image"
51+
size="36"
52+
style="marginTop: -30px; marginLeft: 60px" />
5453
<global-outlined v-else :style="{fontSize: '36px', marginLeft: '60px', marginTop: '-40px'}"/>
5554
</div>
5655
</a-radio>
@@ -1447,6 +1446,7 @@ export default {
14471446
: null
14481447
})
14491448
}
1449+
if (!apiName) return resolve(zones)
14501450
14511451
if (this.vm.templateid && this.templateProperties && Object.keys(this.templateProperties).length > 0) {
14521452
this.templateProperties.forEach((props, category) => {
@@ -1611,9 +1611,6 @@ export default {
16111611
'maxmemory' in serviceOffering.serviceofferingdetails && 'maxcpunumber' in serviceOffering.serviceofferingdetails &&
16121612
'minmemory' in serviceOffering.serviceofferingdetails
16131613
},
1614-
getImg (image) {
1615-
return 'data:image/png;charset=utf-8;base64, ' + image
1616-
},
16171614
updateOverrideRootDiskShowParam (val) {
16181615
if (val) {
16191616
this.showRootDiskSizeChanger = false
@@ -2578,6 +2575,7 @@ export default {
25782575
},
25792576
fetchTemplateNics (template) {
25802577
var nics = []
2578+
this.nicToNetworkSelection = []
25812579
if (template && template.deployasisdetails && Object.keys(template.deployasisdetails).length > 0) {
25822580
var keys = Object.keys(template.deployasisdetails)
25832581
keys = keys.filter(key => key.startsWith('network-'))
@@ -2589,7 +2587,6 @@ export default {
25892587
return a.InstanceID - b.InstanceID
25902588
})
25912589
if (this.options.networks && this.options.networks.length > 0) {
2592-
this.nicToNetworkSelection = []
25932590
for (var i = 0; i < nics.length; ++i) {
25942591
var nic = nics[i]
25952592
nic.id = nic.InstanceID

0 commit comments

Comments
 (0)