You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.4 KiB
HTML
77 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Jinja2 Template Example</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
|
<style type="text/css">
|
|
.container {
|
|
padding-top: 80px;
|
|
}
|
|
.bg-green {
|
|
background-color: rgba(102,178,102,.8);
|
|
}
|
|
.bg-red {
|
|
background-color: rgba(255,76,76,.8);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Totals</h1>
|
|
<p>Accounts: {{ totals['accounts'] | length }}</p>
|
|
<p>Regions: {{ totals['regions'] | length }}</p>
|
|
<p>Total Scans: {{ totals['scan_results'] | length }}</p>
|
|
<p>Passes: {{ totals['passes'] | length }}</p>
|
|
<p>Fails: {{ totals['fails'] | length }}</p>
|
|
<p>Infos: {{ totals['infos'] | length }}</p>
|
|
<h1>Findings</h1>
|
|
<table class="table table-striped table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>Account ID</th>
|
|
<th>Region</th>
|
|
<th>Title ID</th>
|
|
<th>Title Text</th>
|
|
<th>Score</th>
|
|
<th>Result</th>
|
|
<th>Notes</th>
|
|
<th>Compliance</th>
|
|
<th>Severity</th>
|
|
<th>Service Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in data %}
|
|
{% set d = data[i] %}
|
|
{% if d['result'] == 'PASS' %}
|
|
{% set color = 'green' %}
|
|
{% elif d['result'] == 'FAIL' %}
|
|
{% set color = 'red' %}
|
|
{% elif d['result'] == 'INFO' %}
|
|
{% set color = 'blue' %}
|
|
{% else %}
|
|
{% set color = 'white' %}
|
|
{% endif %}
|
|
<tr class="bg-{{ color }}">
|
|
<td>{{ d['account_id'] }}</td>
|
|
<td>{{ d['region'] }}</td>
|
|
<td>{{ d['title_id'] }}</td>
|
|
<td>{{ d['title_text'] }}</td>
|
|
<td>{{ d['scored'] }}</td>
|
|
<td>{{ d['result'] }}</td>
|
|
<td>{{ d['notes'] }}</td>
|
|
<td>{{ d['compliance'] }}</td>
|
|
<td>{{ d['severity'] }}</td>
|
|
<td>{{ d['service_name'] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
|
|
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
|
|
</body>
|
|
</html>
|