mirror of
https://github.com/P-Aimon-Pen/ROFMAD
synced 2026-06-21 13:45:02 +00:00
101 lines
2.8 KiB
HTML
101 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block extra_head %}
|
|
<style>
|
|
.task-output-page { max-width: 1440px; margin: 0 auto; }
|
|
|
|
.task-output-header {
|
|
background-color: var(--gb-bg1);
|
|
border: 1px solid var(--gb-bg2);
|
|
padding: 1rem 1.25rem;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.task-output-title {
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
color: var(--gb-blue-b);
|
|
font-family: 'JetBrains Mono', monospace;
|
|
margin: 0;
|
|
}
|
|
|
|
.task-output-meta {
|
|
font-size: 0.78rem;
|
|
color: var(--text-muted);
|
|
font-family: 'JetBrains Mono', monospace;
|
|
}
|
|
|
|
.task-status-badge {
|
|
display: inline-block;
|
|
padding: 0.15rem 0.5rem;
|
|
font-size: 0.65rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.07em;
|
|
border: 1px solid;
|
|
font-family: 'JetBrains Mono', monospace;
|
|
}
|
|
.status-completed { background: rgba(104,157,106,0.18); color: var(--gb-aqua-b); border-color: var(--gb-aqua); }
|
|
.status-timeout { background: rgba(214,93,14,0.18); color: var(--gb-orange-b); border-color: var(--gb-orange); }
|
|
.status-cancelled { background: var(--gb-bg2); color: var(--text-muted); border-color: var(--gb-bg3); }
|
|
|
|
.task-output-pre {
|
|
background-color: var(--gb-bg);
|
|
border: 1px solid var(--gb-bg2);
|
|
color: var(--text-secondary);
|
|
font-family: 'JetBrains Mono', monospace;
|
|
font-size: 0.78rem;
|
|
line-height: 1.5;
|
|
padding: 1rem 1.25rem;
|
|
overflow: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
min-height: 60vh;
|
|
max-height: 80vh;
|
|
}
|
|
|
|
.no-output {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block title %}{{ task_name }} — {{ target }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="task-output-page">
|
|
<div class="task-output-header">
|
|
<h2 class="task-output-title">{{ task_name }}</h2>
|
|
<span class="task-output-meta">{{ target }}</span>
|
|
<span class="task-status-badge status-{{ status }}">{{ status }}</span>
|
|
<span class="task-output-meta" id="duration-display"></span>
|
|
</div>
|
|
{% if output.len() > 0 %}
|
|
<pre class="task-output-pre">{{ output }}</pre>
|
|
{% else %}
|
|
<pre class="task-output-pre"><span class="no-output">No output captured for this task.</span></pre>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<script>
|
|
(function() {
|
|
const startedAt = {{ started_at }};
|
|
const endedAt = {{ ended_at }};
|
|
const durationS = endedAt - startedAt;
|
|
const dur = durationS < 60
|
|
? durationS + 's'
|
|
: Math.floor(durationS / 60) + 'm ' + (durationS % 60) + 's';
|
|
const started = new Date(startedAt * 1000).toLocaleString();
|
|
document.getElementById('duration-display').textContent =
|
|
'Started: ' + started + ' · Duration: ' + dur;
|
|
})();
|
|
</script>
|
|
{% endblock %}
|