129 lines
4.9 KiB
HTML
129 lines
4.9 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<header class="mb-stack-lg">
|
|
<h1 class="text-headline-xl-mobile font-bold text-on-background md:text-headline-xl">TLS Report {{ report.id }}</h1>
|
|
<p class="mt-1 text-body-base text-on-surface-variant">{{ report.domain }} · {{ report.org_name or "unknown organization" }}</p>
|
|
</header>
|
|
|
|
<section class="mb-stack-lg grid grid-cols-1 gap-gutter md:grid-cols-2 xl:grid-cols-4">
|
|
<div class="metric-card">
|
|
<span class="label-caps">Report Org</span>
|
|
<span class="text-body-base font-bold">{{ report.org_name or "unknown" }}</span>
|
|
</div>
|
|
<div class="metric-card">
|
|
<span class="label-caps">Report ID</span>
|
|
<span class="break-all font-mono text-data-mono">{{ report.report_id or report.id }}</span>
|
|
</div>
|
|
<div class="metric-card">
|
|
<span class="label-caps">Date Range</span>
|
|
<span class="font-mono text-data-mono">{{ report.date_begin | fmt_dt }}<br>{{ report.date_end | fmt_dt }}</span>
|
|
</div>
|
|
<div class="metric-card">
|
|
<span class="label-caps">Contact</span>
|
|
<span class="break-all font-mono text-data-mono">{{ report.contact_info or "not reported" }}</span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="mb-stack-lg">
|
|
<h2 class="mb-stack-md text-headline-md font-semibold">Alerts From This TLS Report</h2>
|
|
<div class="dw-alert-feed">
|
|
{% for alert in alerts %}
|
|
<a class="dw-alert-item is-{{ alert.severity_class }}" href="/alerts?domain={{ report.domain }}&alert_type={{ alert.type }}">
|
|
<span class="dw-alert-row">
|
|
<span>{{ alert.severity }}</span>
|
|
<time>{{ alert.status }}</time>
|
|
</span>
|
|
<strong>{{ alert.title }}</strong>
|
|
<p>{{ alert.llm_summary or alert.summary }}</p>
|
|
</a>
|
|
{% else %}
|
|
<div class="dw-alert-empty">No alerts are linked to this TLS report.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
|
|
<section class="mb-stack-lg">
|
|
<h2 class="mb-stack-md text-headline-md font-semibold">Policies</h2>
|
|
<div class="surface-card overflow-hidden">
|
|
<div class="data-table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Policy</th>
|
|
<th>MX Hosts</th>
|
|
<th>Successful Sessions</th>
|
|
<th>Failed Sessions</th>
|
|
<th>Failure Rate</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for policy in report.policies %}
|
|
<tr>
|
|
<td>
|
|
<span class="status-chip chip-info">{{ policy.policy_type or "unknown" }}</span>
|
|
<code class="mt-stack-sm block font-mono text-data-mono">{{ policy.policy_domain }}</code>
|
|
</td>
|
|
<td>
|
|
{% for host in policy.mx_hosts %}
|
|
<code class="mb-1 block font-mono text-data-mono">{{ host }}</code>
|
|
{% else %}
|
|
<span class="text-on-surface-variant">not reported</span>
|
|
{% endfor %}
|
|
</td>
|
|
<td>{{ policy.total_successful_session_count }}</td>
|
|
<td><span class="status-chip {{ 'chip-pass' if policy.total_failure_session_count == 0 else 'chip-fail' }}">{{ policy.total_failure_session_count }}</span></td>
|
|
<td>{{ "%.1f"|format(policy.failure_rate) }}%</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5" class="text-on-surface-variant">No policies found in this report.</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2 class="mb-stack-md text-headline-md font-semibold">Failure Details</h2>
|
|
<div class="surface-card overflow-hidden">
|
|
<div class="data-table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Result</th>
|
|
<th>Failed Sessions</th>
|
|
<th>Receiving MX</th>
|
|
<th>Sending MTA IP</th>
|
|
<th>Receiving IP</th>
|
|
<th>Reason</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% set ns = namespace(rows=0) %}
|
|
{% for policy in report.policies %}
|
|
{% for failure in policy.failures %}
|
|
{% set ns.rows = ns.rows + 1 %}
|
|
<tr>
|
|
<td><span class="status-chip chip-fail">{{ failure.result_type or "unknown" }}</span></td>
|
|
<td>{{ failure.failed_session_count }}</td>
|
|
<td class="font-mono text-data-mono">{{ failure.receiving_mx_hostname or failure.receiving_mx_helo or "not reported" }}</td>
|
|
<td class="font-mono text-data-mono">{{ failure.sending_mta_ip or "not reported" }}</td>
|
|
<td class="font-mono text-data-mono">{{ failure.receiving_ip or "not reported" }}</td>
|
|
<td>{{ failure.failure_reason_code or failure.additional_information or "not reported" }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if ns.rows == 0 %}
|
|
<tr>
|
|
<td colspan="6" class="text-on-surface-variant">No failure details were reported.</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|