| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <pstm-uri>/</pstm-uri>
- <pstm-template>main</pstm-template>
- <script>
- // Live dashboard: the pulse subscription (see the entrypoint)
- // re-runs the sealed refresh action whenever task or saddle state
- // changes, so progress, blocks and review requests stream in.
- if (window.statum) {
- (function () {
- 'use strict';
- statum.addStateListener('pulse', function () {
- var dashboard = statum.read('dashboard');
- if (dashboard && dashboard.refresh) {
- statum.act(dashboard.refresh).catch(function () { });
- }
- });
- })();
- }
- </script>
- </head>
- <body>
- <section>
- <h2>Dashboard</h2>
- <p stm-if="dashboard == null">Loading…</p>
- <div stm-if="dashboard != null">
- <div class="cards">
- <section class="card">
- <h3>Queue</h3>
- <p><strong stm-text="dashboard.ready_count">0</strong> ready to dispatch</p>
- <p class="muted"><span stm-text="dashboard.queued_count">0</span> queued ·
- <span stm-text="dashboard.active_count">0</span> active ·
- <span stm-text="dashboard.blocked_count">0</span> blocked</p>
- <p class="muted"><span stm-text="dashboard.done_count">0</span> done ·
- <span stm-text="dashboard.failed_count">0</span> failed</p>
- </section>
- <section class="card">
- <h3>Saddles</h3>
- <p><strong stm-text="dashboard.idle_saddle_count">0</strong> idle</p>
- <p><a href="/saddles">Manage saddles</a> · <a href="/tasks">Task queue</a></p>
- </section>
- </div>
- <h3 stm-if="dashboard.pinned.length > 0">Needs a human
- (<span stm-text="dashboard.pinned.length">0</span> open)</h3>
- <p class="muted" stm-if="dashboard.pinned.length > 0">Open questions, RFCs and
- reviews across all tasks, newest first — follow the link to answer on the
- task page.</p>
- <div class="cards" stm-if="dashboard.pinned.length > 0">
- <section class="card" stm-for-blockview-in="dashboard.pinned">
- <p><span stm-attribute.class="'badge badge-' + blockview.block_type" stm-text="blockview.block_type">type</span>
- <span class="muted" stm-text="blockview.created_display">when</span></p>
- <p><strong stm-text="blockview.question">question</strong></p>
- <p><a stm-attribute.href="'/tasks/' + blockview.task_id" stm-text="blockview.task_title">task</a></p>
- </section>
- </div>
- <p stm-if="dashboard.pinned.length == 0" class="muted">Nothing needs a human —
- no open questions, RFCs or reviews.</p>
- <!-- "Waiting on subtasks to be enqueued" (plan 11 task D):
- every suspended parent whose draft subtasks hold up the
- work, linked straight to where Enqueue lives. -->
- <h3 stm-if="dashboard.waiting_drafts.length > 0">Waiting on subtasks to be enqueued
- (<span stm-text="dashboard.waiting_drafts.length">0</span>)</h3>
- <p class="muted" stm-if="dashboard.waiting_drafts.length > 0">These tasks are parked until their
- draft subtasks are enqueued — follow a link and press "Enqueue task".</p>
- <div class="cards" stm-if="dashboard.waiting_drafts.length > 0">
- <section class="card" stm-for-waiting-in="dashboard.waiting_drafts" stm-key="waiting.task_id">
- <h3><a stm-attribute.href="'/tasks/' + waiting.task_id" stm-text="waiting.title">task</a></h3>
- <p><span class="badge badge-suspended">parked</span>
- <span stm-text="waiting.draft_subtasks">0</span>
- <span stm-text="waiting.draft_subtasks == 1 ? 'subtask' : 'subtasks'">subtasks</span>
- still in draft:</p>
- <ul class="waiting-drafts">
- <li stm-for-draft-in="waiting.drafts" stm-key="draft.id">
- <a stm-attribute.href="'/tasks/' + draft.id" stm-text="draft.title">draft</a>
- <span class="badge badge-draft">draft</span>
- </li>
- </ul>
- <p class="muted">Enqueue them from their pages so this task can finish.</p>
- </section>
- </div>
- <h3 stm-if="dashboard.active_tasks.length > 0">Active tasks</h3>
- <table stm-if="dashboard.active_tasks.length > 0">
- <thead><tr><th>Task</th><th>Status</th><th>Branch</th><th>Latest progress</th></tr></thead>
- <tbody>
- <tr stm-for-active-in="dashboard.active_tasks">
- <td><a stm-attribute.href="'/tasks/' + active.id" stm-text="active.title">task</a></td>
- <td><span stm-attribute.class="'badge badge-' + active.status" stm-text="active.status">status</span></td>
- <td stm-text="active.task_branch">branch</td>
- <td><strong stm-if="active.latest_progress.length > 0" stm-text="active.latest_progress">progress</strong>
- <span class="muted" stm-if="active.latest_progress.length > 0" stm-text="active.progress_display">when</span>
- <span class="muted" stm-if="active.latest_progress.length == 0">—</span></td>
- </tr>
- </tbody>
- </table>
- <h3>Saddles</h3>
- <div class="cards">
- <section class="card" stm-for-saddle-in="dashboard.saddles">
- <h3 stm-text="saddle.name">name</h3>
- <p><span stm-attribute.class="'badge badge-' + saddle.status" stm-text="saddle.status">status</span>
- <span class="muted" stm-text="saddle.host">host</span></p>
- <p stm-if="saddle.current_task_id > 0">Working on
- <a stm-attribute.href="'/tasks/' + saddle.current_task_id" stm-text="saddle.current_task_title">task</a></p>
- <p stm-if="saddle.current_task_id == 0" class="muted">No current task</p>
- </section>
- <section class="card" stm-if="dashboard.saddles.length == 0">
- <p class="muted">No saddles registered.</p>
- </section>
- </div>
- <h3>Activity</h3>
- <p class="muted">The last <span stm-text="dashboard.activity.length">0</span> events
- across all tasks, newest first.</p>
- <table>
- <thead><tr><th>When</th><th>Task</th><th>Event</th></tr></thead>
- <tbody>
- <tr stm-for-item-in="dashboard.activity">
- <td stm-text="item.when_display">when</td>
- <td><a stm-attribute.href="'/tasks/' + item.task_id" stm-text="item.task_title">task</a></td>
- <td><span stm-attribute.class="'badge badge-' + item.kind" stm-text="item.kind">kind</span>
- <span stm-text="item.text">activity</span></td>
- </tr>
- <tr stm-if="dashboard.activity.length == 0"><td colspan="3" class="muted">Nothing yet.</td></tr>
- </tbody>
- </table>
- </div>
- </section>
- </body>
- </html>
|