Support working with local charts (#215)

* Basic functioning

* Support reconfiguring

* Improve tests coverage

* Always update local repo, don't offer to delete it

* Handle multi-repo correctly

* Document local charts usage

* Screenshot for docs
This commit is contained in:
Andrey Pokhilko
2023-02-15 16:45:28 +00:00
committed by GitHub
parent 6a4ca793c9
commit f49f52efe4
17 changed files with 275 additions and 170 deletions

View File

@@ -10,7 +10,7 @@ function loadRepoView() {
data.sort((a, b) => (a.name > b.name) - (a.name < b.name))
data.forEach(function (elm) {
let opt = $('<li class="mb-2"><label><input type="radio" name="cluster" class="me-2"/><span></span></label></li>');
let opt = $('<li class="mb-2"><label><input type="radio" name="repo" class="me-2"/><span></span></label></li>');
opt.attr('title', elm.url)
opt.find("input").val(elm.name).text(elm.name).data("item", elm)
opt.find("span").text(elm.name)
@@ -30,6 +30,8 @@ function loadRepoView() {
$("#sectionRepo .repo-details h2").text(elm.name)
$("#sectionRepo .repo-details .url").text(elm.url)
$("#sectionRepo .btn-remove").prop("disabled", elm.url.startsWith('file://'))
$("#sectionRepo .repo-details ul").html('<span class="spinner-border spinner-border-sm mx-1" role="status" aria-hidden="true"></span>')
$.getJSON("/api/helm/repositories/" + elm.name).fail(function (xhr) {
reportError("Failed to get list of charts in repo", xhr)