Skip to content

Commit

Permalink
fix: Rearrange sections in HTML report for namespace (#491)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
  • Loading branch information
danielpacak committed Apr 10, 2021
1 parent a7de614 commit 748d553
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 106 deletions.
86 changes: 43 additions & 43 deletions pkg/report/templates/namespace_report.qtpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Aqua Starboard Namespace Security Report - Namespace: {%s p.Namespace.Name %}
</div>
</div>

<h3>Top 5 vulnerable images by count</h3>
<div class="row">
<h3>Top 5 vulnerable images by count</h3>
<table class="table table-sm table-bordered">
<thead>
<tr>
Expand All @@ -48,53 +48,53 @@ Aqua Starboard Namespace Security Report - Namespace: {%s p.Namespace.Name %}
</table>
</div>

<h3>Top 5 failed configuration checks by affected workloads count</h3>
<div class="row">
<table class="table table-sm table-bordered">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Severity</th>
<th scope="col">Category</th>
<th scope="col">Affected Workloads</th>
</tr>
</thead>
<tbody>
{% for _, report := range p.Top5FailedChecks %}
<div class="row">
<h3>Top 5 vulnerabilities by score</h3>
<table class="table table-sm table-bordered">
<thead>
<tr>
<td>{%s report.ID %}</td>
<td>{%s report.Severity %}</td>
<td>{%s report.Category %}</td>
<td>{%d report.AffectedWorkloads %}</td>
<th scope="col">ID</th>
<th scope="col">Severity</th>
<th scope="col">Score</th>
<th scope="col">Affected Workloads</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</thead>
<tbody>
{% for _, vulnerability := range p.Top5Vulnerability %}
<tr>
<td><a href="{%s vulnerability.PrimaryLink %}">{%s vulnerability.VulnerabilityID %}</a></td>
<td>{%s string(vulnerability.Severity) %}</td>
<td>{%f *vulnerability.Score %}</td>
<td>{%d vulnerability.AffectedWorkloads %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

<h3>Top 5 vulnerabilities by score</h3>
<div class="row">
<table class="table table-sm table-bordered">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Severity</th>
<th scope="col">Score</th>
<th scope="col">Affected Workloads</th>
</tr>
</thead>
<tbody>
{% for _, vulnerability := range p.Top5Vulnerability %}
<div class="row">
<h3>Top 5 failed workload configs</h3>
<table class="table table-sm table-bordered">
<thead>
<tr>
<td><a href="{%s vulnerability.PrimaryLink %}">{%s vulnerability.VulnerabilityID %}</a></td>
<td>{%s string(vulnerability.Severity) %}</td>
<td>{%f *vulnerability.Score %}</td>
<td>{%d vulnerability.AffectedWorkloads %}</td>
<th scope="col">Name</th>
<th scope="col">Severity</th>
<th scope="col">Category</th>
<th scope="col">Affected Workloads</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</thead>
<tbody>
{% for _, report := range p.Top5FailedChecks %}
<tr>
<td>{%s report.ID %}</td>
<td>{%s report.Severity %}</td>
<td>{%s report.Category %}</td>
<td>{%d report.AffectedWorkloads %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

</div>
{% endfunc %}
Expand Down
126 changes: 63 additions & 63 deletions pkg/report/templates/namespace_report.qtpl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 748d553

Please sign in to comment.