mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Add version information into UI (#35)
This commit adds the tool version into the UI in the top bar.
This commit is contained in:
@@ -44,6 +44,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="toolVersion">
|
||||
</div>
|
||||
|
||||
<div class="separator-vertical mx-3"><span></span></div>
|
||||
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
|
||||
@@ -21,6 +21,12 @@ $(function () {
|
||||
$("#upgradeModal .btn-scan").hide()
|
||||
}
|
||||
})
|
||||
|
||||
$.get("/status").fail(function (xhr) {
|
||||
reportError("Failed to get tool version", xhr)
|
||||
}).done(function (data) {
|
||||
fillToolVersion(data)
|
||||
})
|
||||
})
|
||||
|
||||
function initView() {
|
||||
@@ -196,3 +202,7 @@ function isNewerVersion(oldVer, newVer) {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function fillToolVersion(data) {
|
||||
$("#toolVersion").append($('<a>' + data + '</a>'))
|
||||
}
|
||||
Reference in New Issue
Block a user