Fix the values not considered correctly when loading the upgrade preview

This commit is contained in:
Andrei Pohilko
2023-02-22 11:24:03 +00:00
parent a7c7ba80fe
commit 778e58360c
2 changed files with 5 additions and 4 deletions

View File

@@ -102,11 +102,11 @@ function popUpUpgrade(elm, ns, name, verCur, lastRev) {
$('#upgradeModal select').append(opt) $('#upgradeModal select').append(opt)
} }
$('#upgradeModal select').val(elm.version).trigger("change").parent().show() $('#upgradeModal select').val(elm.version).parent().show()
upgrPopUpCommon(verCur, ns, lastRev, name) upgrPopUpCommon(verCur, ns, lastRev, name)
}) })
} else { // chart without repo reconfigure } else { // chart without repo reconfigure
$('#upgradeModal select').empty().trigger("change").parent().hide() $('#upgradeModal select').empty().parent().hide()
upgrPopUpCommon(verCur, ns, lastRev, name) upgrPopUpCommon(verCur, ns, lastRev, name)
} }
} }
@@ -121,9 +121,11 @@ function upgrPopUpCommon(verCur, ns, lastRev, name) {
reportError("Failed to get charts values info", xhr) reportError("Failed to get charts values info", xhr)
}).done(function (data) { }).done(function (data) {
$("#upgradeModal textarea").val(data).data("dirty", false) $("#upgradeModal textarea").val(data).data("dirty", false)
$('#upgradeModal select').trigger("change")
}) })
} else { } else {
$("#upgradeModal textarea").val("").data("dirty", true) $("#upgradeModal textarea").val("").data("dirty", true)
$('#upgradeModal select').trigger("change")
} }
} }

View File

@@ -64,10 +64,9 @@
</li> </li>
<li class="nav-item mx-2 display-none upgrade-possible"> <li class="nav-item mx-2 display-none upgrade-possible">
<a class="nav-link position-relative text-danger" <a class="nav-link position-relative text-danger"
href="https://github.com/komodorio/helm-dashboard#installing" target="_blank"> href="https://github.com/komodorio/helm-dashboard/releases" target="_blank">
Upgrade to <span id="toolVersionUpgrade"></span> Upgrade to <span id="toolVersionUpgrade"></span>
</a></li> </a></li>
</ul> </ul>
<div> <div>
<a class="btn" href="https://komodor.com/?utm_campaign=Helm-Dash&utm_source=helm-dash"><img <a class="btn" href="https://komodor.com/?utm_campaign=Helm-Dash&utm_source=helm-dash"><img