mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Add option to execute Tests for release (#178)
* Add button to execute tests * Create API to execute tests * Add modal for Test response * Make API call to execute tests and show response in modal * Clean up * Update docs - feature execute tests for a release * Add arg '--logs' to 'helm test' cmd * Wait for API to complete before sending back response to frontend * Add loading spinner until reponse for 'helm test' is returned from backend by API * Clean-up Co-authored-by: Harshit Mehta <harshitm@nvidia.com>
This commit is contained in:
@@ -343,3 +343,18 @@ $("#btnAddRepository").click(function () {
|
||||
setHashParam("section", "repository")
|
||||
window.location.reload()
|
||||
})
|
||||
|
||||
$("#btnTest").click(function() {
|
||||
$("#testModal .test-result").empty().prepend('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>')
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "/api/helm/charts/tests" + "?namespace=" + getHashParam("namespace") + "&name=" + getHashParam("chart")
|
||||
}).fail(function (xhr) {
|
||||
reportError("Failed to execute test for chart", xhr)
|
||||
}).done(function (data) {
|
||||
$("#testModal .test-result").empty().html(data.replaceAll("\n", "<br>"))
|
||||
})
|
||||
|
||||
const myModal = new bootstrap.Modal(document.getElementById('testModal'), {});
|
||||
myModal.show()
|
||||
})
|
||||
Reference in New Issue
Block a user