mirror of https://github.com/rancher/dashboard.git
respect prerelease preference when auto-selecting helm chart version; retain version query param when cancelling chart install (#8514)
This commit is contained in:
parent
95c1be127c
commit
b059eaa6de
|
|
@ -292,7 +292,13 @@ export default {
|
||||||
// use the first version provided by the Helm chart
|
// use the first version provided by the Helm chart
|
||||||
// as the default.
|
// as the default.
|
||||||
if ( !this.query.versionName && this.chart.versions?.length ) {
|
if ( !this.query.versionName && this.chart.versions?.length ) {
|
||||||
this.query.versionName = this.chart.versions[0].version;
|
if (this.showPreRelease) {
|
||||||
|
this.query.versionName = this.chart.versions[0].version;
|
||||||
|
} else {
|
||||||
|
const firstRelease = this.chart.versions.find(v => !isPrerelease(v.version));
|
||||||
|
|
||||||
|
this.query.versionName = firstRelease?.version || this.chart.versions[0].version;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !this.query.versionName ) {
|
if ( !this.query.versionName ) {
|
||||||
|
|
@ -426,7 +432,7 @@ export default {
|
||||||
repoType: this.chart.repoType,
|
repoType: this.chart.repoType,
|
||||||
repoName: this.chart.repoName,
|
repoName: this.chart.repoName,
|
||||||
name: this.chart.chartName,
|
name: this.chart.chartName,
|
||||||
version: this.chart.versionName,
|
version: this.query.versionName,
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue