diff --git a/core/frontend/src/components/version-chooser/VersionChooser.vue b/core/frontend/src/components/version-chooser/VersionChooser.vue
index 5d5fd820ed..fcf1f5ac29 100644
--- a/core/frontend/src/components/version-chooser/VersionChooser.vue
+++ b/core/frontend/src/components/version-chooser/VersionChooser.vue
@@ -52,7 +52,7 @@
>
Local Versions
@@ -75,7 +75,7 @@
>
Remote Versions
{
+ this.local_versions.loading = false
+ this.local_versions.result = versions_query
+ })
+ .catch((error) => {
+ this.local_versions.result = {
+ local: [],
+ error: `Failed to communicate with backend: ${error}`,
+ }
+ })
+ },
+ async loadAvailableVersions() {
this.loading_images = true
this.available_versions.error = null
@@ -358,12 +384,18 @@ export default Vue.extend({
}
})
},
+ async loadVersions() {
+ Promise.all([
+ this.loadLocalVersions(),
+ this.loadAvailableVersions(),
+ ])
+ },
async loadCurrentVersion() {
await VCU.loadCurrentVersion()
.then((image) => {
this.current_version = image
this.selected_image = image.repository
- this.loadAvailableversions()
+ this.loadVersions()
})
},
updateIsAvailable(image: Version) {
@@ -391,7 +423,7 @@ export default Vue.extend({
}).finally(() => {
this.disable_upload_controls = false
this.upload_percentage = 0
- setTimeout(() => { this.loadAvailableversions() }, 1000)
+ setTimeout(() => { this.loadVersions() }, 1000)
})
}
},
@@ -452,7 +484,7 @@ export default Vue.extend({
tag,
},
}).then(() => {
- // Remove this image in the frontend, as calling loadAvailableversions()
+ // Remove this image in the frontend, as calling loadVersions()
// takes a longer time to fetch all images
this.available_versions.local = this.available_versions.local.filter(
(element) => element.repository !== repository || element.tag !== tag,