Files
cobol-java-v3/web/templates/result.html
T
2026-05-24 12:52:20 +08:00

28 lines
1021 B
HTML

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Result - {{ task.id }}</title>
<link rel="stylesheet" href="/static/style.css"></head><body>
<div class="container">
<h1>Verification Result</h1>
{% if task.status == "done" and task.result %}
<pre class="pass">Status: {{ task.result.status }}
Program: {{ task.result.program }}
Matched: {{ task.result.matched }} | Mismatched: {{ task.result.mismatched }}
Runner: {{ task.result.runner }} | Duration: {{ task.result.duration }}s</pre>
{% elif task.status == "error" %}
<pre class="fail">{{ task.result }}</pre>
{% else %}
<div id="poll-status">Status: {{ task.status }} — polling...</div>
<script>
const id = "{{ task.id }}";
setInterval(async () => {
const r = await fetch("/status/" + id);
const d = await r.json();
document.getElementById("poll-status").textContent = "Status: " + d.status;
if (d.status === "done" || d.status === "error") location.reload();
}, 3000);
</script>
{% endif %}
<a href="/">← New verification</a>
</div>
</body></html>