Files
decomp.dev/templates/report.html
T
2024-09-06 19:45:36 -06:00

128 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<meta name="darkreader-lock">
<meta name="description" content="Decompilation progress report for {{ project_name }}{% if current_category.id != 'all' %} ({{ current_category.name }}){% endif %}">
<title>{{ project_short_name }}{% if current_category.id != "all" %} ({{ current_category.name }}){% endif %} • Progress Report</title>
<link rel="stylesheet" href="/css/main.min.css?2">
<script src="https://unpkg.com/htmx.org@2.0.2"
integrity="sha384-Y7hw+L/jvKeWIRRkqWYfPcvVxHzVzn5REgzbawhxAuQGwX1XWe70vji+VSeHOThJ"
crossorigin="anonymous"></script>
<script src="/js/graph.min.js?2"></script>
<meta property="og:type" content="website">
<meta property="og:title" content="{{ project_short_name }}{% if current_category.id != 'all' %} ({{ current_category.name }}){% endif %} is {{ measures.matched_code_percent | round(2) }}% decompiled">
<meta property="og:description" content="Decompilation progress report for {{ project_name }}{% if current_category.id != 'all' %} ({{ current_category.name }}){% endif %}">
<meta property="og:image" content="https://decomp.dev{{ project_path | safe }}/{{ version }}/{{ commit }}.png">
</head>
<body>
<header>
<nav data-hx-boost="false">
<ul>
<li>
<a href="https://decomp.dev">
<strong>decomp.dev</strong>
</a>
</li>
<li>
<a href="/">Projects</a>
</li>
<li>
<a href="{{ project_path | safe }}">{{ project_short_name }}</a>
</li>
<li>
<details class="dropdown">
<summary>{{ version }}</summary>
<ul dir="rtl">
{% for version in versions %}
<li><a href="{{ project_path | safe }}/{{ version }}">{{ version }}</a></li>
{% endfor %}
</ul>
</details>
</li>
</ul>
<ul>
<li>
<a href="https://ghidra.decomp.dev">Ghidra</a>
</li>
</ul>
</nav>
</header>
<main>
<h3>
{{ project_short_name }}{% if current_category.id != "all" %} ({{ current_category.name }}){% endif %} is {{ measures.matched_code_percent | round(2) }}% decompiled
</h3>
<h4 class="muted">{{ measures.complete_code_percent | round(2) }}% fully linked</h4>
<h6 class="report-header">Code</h6>
<div class="progress-root code">
<div class="progress-section" style="width: {{ measures.complete_code_percent }}%"></div>
<div class="progress-section striped"
style="width: {{ measures.matched_code_percent - measures.complete_code_percent }}%"></div>
<div class="progress-section striped"
style="width: {{ measures.fuzzy_match_percent - measures.matched_code_percent }}%"></div>
</div>
<!-- Invisible overlay for tooltips -->
<div class="progress-root overlay">
<div class="progress-section" style="width: {{ measures.complete_code_percent }}%"
data-tooltip="{{ measures.complete_code_percent | round(2) }}% fully linked"></div>
<div class="progress-section"
style="width: {{ measures.matched_code_percent - measures.complete_code_percent }}%"
data-tooltip="{{ measures.matched_code_percent | round(2) }}% perfect match"></div>
<div class="progress-section"
style="width: {{ measures.fuzzy_match_percent - measures.matched_code_percent }}%"
data-tooltip="{{ measures.fuzzy_match_percent | round(2) }}% fuzzy match"></div>
</div>
<h6 class="report-header">Data</h6>
<div class="progress-root data">
<div class="progress-section" style="width: {{ measures.complete_data_percent }}%"></div>
<div class="progress-section striped"
style="width: {{ measures.matched_data_percent - measures.complete_data_percent }}%"></div>
</div>
<!-- Invisible overlay for tooltips -->
<div class="progress-root overlay">
<div class="progress-section" style="width: {{ measures.complete_data_percent }}%"
data-tooltip="{{ measures.complete_data_percent | round(2) }}% fully linked"></div>
<div class="progress-section"
style="width: {{ measures.matched_data_percent - measures.complete_data_percent }}%"
data-tooltip="{{ measures.matched_data_percent | round(2) }}% perfect match"></div>
</div>
<h6 class="report-header">Units</h6>
{% if categories | length > 1 %}
<details class="dropdown" data-hx-boost="false">
<summary>{{ current_category.name }}</summary>
<ul>
{% for category in categories %}
<li><a href="?category={{ category.id }}">{{ category.name }}</a></li>
{% endfor %}
</ul>
</details>
{% endif %}
<script>
document.write('<canvas id="graph" width="100%" data-hx-preserve="true"></canvas>');
drawGraph("graph", {{ units_json | safe }});
</script>
<noscript>
<img id="graph" src="{{ project_path | safe }}/{{ version }}/{{ commit }}.png" alt="Progress graph">
</noscript>
<h6 class="report-header">Links</h6>
<div>
<p>
<a href="{{ project_url | safe }}" target="_blank">GitHub</a> (<a
href="{{ project_url | safe }}/commit/{{ commit }}" target="_blank">{{ commit[:7] }}</a>)
</p>
{% if prev_commit %}
<p><a href="{{ project_path | safe }}/{{ version }}/{{ prev_commit }}">Previous commit</a></p>
{% endif %}
{% if next_commit %}
<p><a href="{{ project_path | safe }}/{{ version }}/{{ next_commit }}">Next commit</a></p>
{% endif %}
</div>
</main>
<footer>
<small class="muted">Generated in [[time]] 🦀</small>
</footer>
</body>
</html>