mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Scanners Integration (#18)
* Research scanning * Move files around * Reports the list * Scanner happens * Commit * Work on alternative * refactorings * Progress * Save the state * Commit * Display trivy Results * Checkov also reports * Better display * Correct trivy numbers * Scan pre-install manifest * Readme items * Static checks
This commit is contained in:
@@ -19,6 +19,23 @@ $(function () {
|
||||
loadChartHistory(namespace, chart)
|
||||
}
|
||||
})
|
||||
|
||||
$.getJSON("/api/scanners").fail(function (xhr) {
|
||||
reportError("Failed to get list of scanners", xhr)
|
||||
}).done(function (data) {
|
||||
for (let n = 0; n < data.length; n++) {
|
||||
const item = $(`
|
||||
<label class="form-check-label me-4">
|
||||
<input class="form-check-input me-1" type="checkbox" checked name="scanner" value="` + data[n] + `"> ` + data[n] + `
|
||||
</label>`)
|
||||
|
||||
$("#nav-scanners form span").prepend(item)
|
||||
}
|
||||
|
||||
if (!data.length) {
|
||||
$("#upgradeModal .btn-scan").hide()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -69,14 +86,14 @@ function statusStyle(status, card, txt) {
|
||||
}
|
||||
|
||||
function getCleanClusterName(rawClusterName) {
|
||||
if (rawClusterName.indexOf('arn')==0) {
|
||||
if (rawClusterName.indexOf('arn') == 0) {
|
||||
// AWS cluster
|
||||
clusterSplit = rawClusterName.split(':')
|
||||
clusterName = clusterSplit.at(-1).split("/").at(-1)
|
||||
region = clusterSplit.at(-3)
|
||||
return region + "/" + clusterName + ' [AWS]'
|
||||
}
|
||||
if (rawClusterName.indexOf('gke')==0) {
|
||||
if (rawClusterName.indexOf('gke') == 0) {
|
||||
// GKE cluster
|
||||
return rawClusterName.split('_').at(-2) + '/' + rawClusterName.split('_').at(-1) + ' [GKE]'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user