Skip to content

Commit af37049

Browse files
committed
fix for consecutive zone change
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent f7c02b9 commit af37049

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ui/src/views/image/AddKubernetesSupportedVersion.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ export default {
133133
zones: [],
134134
zoneLoading: false,
135135
loading: false,
136-
directDownloadDisabled: false
136+
selectedZone: {},
137+
directDownloadDisabled: false,
138+
lastNonEdgeDirectDownloadUserSelection: false
137139
}
138140
},
139141
beforeCreate () {
@@ -220,13 +222,21 @@ export default {
220222
},
221223
handleZoneChange (zoneIdx) {
222224
const zone = this.zones[zoneIdx]
225+
if (this.selectedZone.type === zone.type) {
226+
return
227+
}
228+
var lastZoneType = this.selectedZone?.type || ''
229+
if (lastZoneType !== 'Edge') {
230+
this.nonEdgeDirectDownloadUserSelection = this.form.directdownload
231+
}
232+
this.selectedZone = zone
223233
if (zone.type && zone.type === 'Edge') {
224234
this.form.directdownload = true
225235
this.directDownloadDisabled = true
226236
return
227237
}
228-
this.form.directdownload = false
229238
this.directDownloadDisabled = false
239+
this.form.directdownload = this.nonEdgeDirectDownloadUserSelection
230240
},
231241
handleSubmit (e) {
232242
e.preventDefault()

0 commit comments

Comments
 (0)