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

@@ -70,4 +70,3 @@ Adding new repository
Recognise & show ArgoCD-originating charts/objects Recognise & show ArgoCD-originating charts/objects
Have cleaner idea on the web API structure Have cleaner idea on the web API structure
See if we can build in Chechov or Validkube validation See if we can build in Chechov or Validkube validation
Add "close" button to shutdown the server, wherever it is

View File

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

View File

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