Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions core/frontend/src/components/version-chooser/VersionChooser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export default Vue.extend({
})
this.updating_bootstrap = false
},
async setBootstrapVersion(version: string) {
async setBootstrapVersion(version: string, reload = true) {
await back_axios({
method: 'post',
url: '/version-chooser/v1.0/bootstrap/current',
Expand All @@ -601,12 +601,19 @@ export default Vue.extend({
`Successfully updated bootstrap version to ${version}`,
true,
)
window.location.reload()
if (reload) {
window.location.reload()
}
})
},
async setVersion(args: string | string[]) {
const fullname: string = Array.isArray(args) ? args[0] : args
const [repository, tag] = fullname.split(':')

if (this.isStable(tag)) {
await this.setBootstrapVersion(tag, false)
}

await back_axios({
method: 'post',
url: '/version-chooser/v1.0/version/current',
Expand Down Expand Up @@ -676,6 +683,9 @@ export default Vue.extend({
isBeingDeleted(image: Version) {
return this.deleting === `${image.repository}:${image.tag}`
},
isStable(tag: string) {
return VCU.isSemVer(tag) && !tag.includes('beta')
},
},
})
</script>