Skip to content

Commit cdcf240

Browse files
committed
Fix k8s iso upload
1 parent 19f4f64 commit cdcf240

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@
12871287
"label.kubernetes.version.add": "Add Kubernetes version",
12881288
"label.kubernetes.version.delete": "Delete Kubernetes version",
12891289
"label.kubernetes.version.update": "Manage Kubernetes version",
1290+
"label.kubernetes.version.from.local": "Add Kubernetes version from local",
12901291
"label.kubernetesversionid": "Kubernetes version",
12911292
"label.kubernetesversionname": "Kubernetes version",
12921293
"label.kvm": "KVM",

ui/src/config/section/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ export default {
398398
{
399399
api: 'getUploadParamsForKubernetesSupportedVersion',
400400
icon: 'cloud-upload-outlined',
401-
label: 'label.kubernetes.version.add.from.local',
401+
label: 'label.kubernetes.version.from.local',
402402
listView: true,
403403
popup: true,
404404
show: isZoneCreated,

ui/src/views/image/AddKubernetesSupportedVersion.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
<template>
1919
<div class="form-layout" v-ctrl-enter="handleSubmit">
20-
<a-spin :spinning="loading">
20+
<span v-if="uploadPercentage > 0">
21+
<loading-outlined />
22+
{{ $t('message.upload.file.processing') }}
23+
<a-progress :percent="uploadPercentage" />
24+
</span>
25+
<a-spin :spinning="loading" v-else>
2126
<a-form
2227
:ref="formRef"
2328
:model="form"
@@ -176,9 +181,11 @@ export default {
176181
zoneLoading: false,
177182
loading: false,
178183
selectedZone: {},
184+
uploadParams: null,
179185
directDownloadDisabled: false,
180186
lastNonEdgeDirectDownloadUserSelection: false,
181187
architectureTypes: {},
188+
uploadPercentage: 0,
182189
currentForm: ['plus-outlined', 'PlusOutlined'].includes(this.action.currentAction.icon) ? 'Create' : 'Upload'
183190
}
184191
},
@@ -332,7 +339,7 @@ export default {
332339
params.format = 'ISO'
333340
this.loading = true
334341
api('getUploadParamsForKubernetesSupportedVersion', params).then(json => {
335-
this.uploadParams = (json.postuploadisoresponse && json.postuploadisoresponse.getuploadparams) ? json.postuploadisoresponse.getuploadparams : ''
342+
this.uploadParams = (json.getuploadparamsforkubernetessupportedversionresponse && json.getuploadparamsforkubernetessupportedversionresponse.getuploadparams) ? json.getuploadparamsforkubernetessupportedversionresponse.getuploadparams : ''
336343
const response = this.handleUpload()
337344
if (response === 'upload successful') {
338345
this.$notification.success({

0 commit comments

Comments
 (0)