Add "close" button to shutdown the server

This commit is contained in:
Andrei Pohilko
2022-09-08 12:11:21 +01:00
parent 8fa3d9b960
commit 4bd510962a
3 changed files with 11 additions and 2 deletions

View File

@@ -47,6 +47,7 @@
<label for="cluster" style="margin-top: 0.5rem">K8s Context:</label>
<select id="cluster" class="form-control"></select>
</form>
<i class="btn fa fa-power-off text-muted" title="Shut down the Helm Dashboard application"></i>
</div>
</div>
</nav>

View File

@@ -346,4 +346,13 @@ function showResources(namespace, chart, revision) {
}
})
}
}
$(".fa-power-off").click(function () {
$.ajax({
url: "/",
type: 'DELETE',
}).done(function () {
window.close();
})
})