Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I5298a925bd9c11780e49d8b1c98eebd86a6a6964
100 lines
2.7 KiB
HTML
100 lines
2.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}FC CI - Dashboard{% endblock %}
|
|
{% block auth %}
|
|
{% if !auth_name.is_empty() %}
|
|
<span class="auth-user">{{ auth_name }}</span>
|
|
<form method="POST" action="/logout"><button type="submit">Logout</button></form>
|
|
{% else %}
|
|
<a href="/login">Login</a>
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<h1>Dashboard</h1>
|
|
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-value">{{ total_builds }}</div>
|
|
<div class="stat-label">Total Builds</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-value">{{ completed_builds }}</div>
|
|
<div class="stat-label">Completed</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-value">{{ failed_builds }}</div>
|
|
<div class="stat-label">Failed</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-value">{{ running_builds }}</div>
|
|
<div class="stat-label">Running</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-value">{{ pending_builds }}</div>
|
|
<div class="stat-label">Pending</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p class="queue-summary">
|
|
<a href="/queue">Queue: {{ pending_builds }} pending, {{ running_builds }} running</a>
|
|
</p>
|
|
|
|
{% if !projects.is_empty() %}
|
|
<h2>Projects Overview</h2>
|
|
<table>
|
|
<thead>
|
|
<tr><th>Project</th><th>Jobsets</th><th>Last Eval</th><th>Time</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for p in projects %}
|
|
<tr>
|
|
<td><a href="/project/{{ p.id }}">{{ p.name }}</a></td>
|
|
<td>{{ p.jobset_count }}</td>
|
|
<td><span class="badge badge-{{ p.last_eval_class }}">{{ p.last_eval_status }}</span></td>
|
|
<td>{{ p.last_eval_time }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
<h2>Recent Builds</h2>
|
|
{% if recent_builds.is_empty() %}
|
|
<p class="empty">No builds yet.</p>
|
|
{% else %}
|
|
<table>
|
|
<thead>
|
|
<tr><th>Job</th><th>Status</th><th>System</th><th>Created</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for b in recent_builds %}
|
|
<tr>
|
|
<td><a href="/build/{{ b.id }}">{{ b.job_name }}</a></td>
|
|
<td><span class="badge badge-{{ b.status_class }}">{{ b.status_text }}</span></td>
|
|
<td>{{ b.system }}</td>
|
|
<td>{{ b.created_at }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
<h2>Recent Evaluations</h2>
|
|
{% if recent_evals.is_empty() %}
|
|
<p class="empty">No evaluations yet.</p>
|
|
{% else %}
|
|
<table>
|
|
<thead>
|
|
<tr><th>Commit</th><th>Status</th><th>Time</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for e in recent_evals %}
|
|
<tr>
|
|
<td><a href="/evaluation/{{ e.id }}">{{ e.commit_short }}</a></td>
|
|
<td><span class="badge badge-{{ e.status_class }}">{{ e.status_text }}</span></td>
|
|
<td>{{ e.time }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% endblock %}
|