mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
bug: fix sorting of release versions (#336)
Signed-off-by: Harshit Mehta <hdm23061993@gmail.com>
This commit is contained in:
@@ -91,7 +91,7 @@ function popUpUpgrade(elm, ns, name, verCur, lastRev) {
|
|||||||
$.getJSON("/api/helm/repositories/versions?name=" + elm.name).fail(function (xhr) {
|
$.getJSON("/api/helm/repositories/versions?name=" + elm.name).fail(function (xhr) {
|
||||||
reportError("Failed to find chart in repo", xhr)
|
reportError("Failed to find chart in repo", xhr)
|
||||||
}).done(function (vers) {
|
}).done(function (vers) {
|
||||||
vers.sort((b, a) => (a.version > b.version) - (a.version < b.version))
|
vers = vers.map( a => a.split('.').map( n => +n+100000 ).join('.') ).sort().map( a => a.split('.').map( n => +n-100000 ).join('.') );
|
||||||
|
|
||||||
// fill versions
|
// fill versions
|
||||||
$('#upgradeModal select').empty()
|
$('#upgradeModal select').empty()
|
||||||
|
|||||||
Reference in New Issue
Block a user