UI: Fix ISO Hypervisor selection (#11261)

This commit is contained in:
Vishesh 2025-07-23 13:07:02 +05:30 committed by GitHub
parent 9d049707d5
commit a710ff8c6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -148,7 +148,7 @@
@handle-image-search-filter="filters => fetchImages(filters)"
@update-image="updateFieldValue"
@update-disk-size="updateFieldValue"
@change-iso-hypervisor="value => hypervisor = value" />
@change-iso-hypervisor="value => form.hypervisor = value" />
<a-card
v-else
:tabList="imageTypeList"

View File

@ -112,7 +112,7 @@
v-model:value="localSelectedIsoHypervisor"
:preFillContent="preFillContent"
:options="isoHypervisorItems"
@change="handleIsoHypervisorChange()"
@change="handleIsoHypervisorChange"
showSearch
optionFilterProp="label"
:filterOption="filterOption" />
@ -325,8 +325,8 @@ export default {
emitUpdateDiskSize (decorator, value) {
this.$emit('update-disk-size', decorator, value)
},
handleIsoHypervisorChange () {
this.$emit('change-iso-hypervisor', this.localIsoHypervisor)
handleIsoHypervisorChange (hypervisor) {
this.$emit('change-iso-hypervisor', hypervisor)
}
}
}

View File

@ -63,7 +63,7 @@
</template>
<script>
import { api } from '@/api'
import { getAPI, postAPI } from '@/api'
import { genericCompare } from '@/utils/sort.js'
import OsLogo from '@/components/widgets/OsLogo'
@ -164,7 +164,7 @@ export default {
params.directdownload = true
}
return new Promise((resolve, reject) => {
api('registerTemplate', params).then(json => {
postAPI('registerTemplate', params).then(json => {
const result = json.registertemplateresponse.template[0]
resolve(result)
}).catch(error => {
@ -225,7 +225,7 @@ export default {
let osTypeId = this.defaultOsTypeId
this.loading = true
try {
const json = await api('listOsTypes', { keyword: osName, filter: 'name,id' })
const json = await getAPI('listOsTypes', { keyword: osName, filter: 'name,id' })
if (json && json.listostypesresponse && json.listostypesresponse.ostype && json.listostypesresponse.ostype.length > 0) {
osTypeId = json.listostypesresponse.ostype[0].id
}