Skip to content

Commit

Permalink
Add "close" button to shutdown the server
Browse files Browse the repository at this point in the history
  • Loading branch information
undera committed Sep 8, 2022
1 parent 8fa3d9b commit 4bd5109
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ Adding new repository
Recognise & show ArgoCD-originating charts/objects
Have cleaner idea on the web API structure
See if we can build in Chechov or Validkube validation
Add "close" button to shutdown the server, wherever it is
1 change: 1 addition & 0 deletions pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
11 changes: 10 additions & 1 deletion pkg/dashboard/static/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,13 @@ function showResources(namespace, chart, revision) {

}
})
}
}

$(".fa-power-off").click(function () {
$.ajax({
url: "/",
type: 'DELETE',
}).done(function () {
window.close();
})
})

0 comments on commit 4bd5109

Please sign in to comment.