Show the watcher itself as a read-only row on the dashboard
The watcher writes its self-update status (running vs latest commit, up to date / updating / held / error) to data/self.json, kept out of state.json so the removed-stack cleanup never touches it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
{% if rows %}
|
||||
{% if rows or me %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -38,6 +38,25 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if me %}
|
||||
{# the watcher itself: updates itself from its own repo, so no deploy/stop/remove here #}
|
||||
{% set cls = {'ok': 'ok', 'updating': 'busy', 'held': 'warn', 'error': 'error'}.get(me.status, 'new') %}
|
||||
{% set label = {'ok': 'up to date', 'updating': 'updating', 'held': 'held'}.get(me.status, me.status) %}
|
||||
<tr class="repo self-row {{ 'has-error' if me.status == 'error' }} {{ 'has-warn' if me.status == 'held' }}">
|
||||
<td class="name-cell"><span class="name" title="{{ me.url }}">{{ me.name }}</span><span class="self-tag">this watcher</span></td>
|
||||
<td data-label="status"><span class="status {{ cls }}"><span class="dot {{ cls }}"></span>{{ label }}</span></td>
|
||||
<td data-label="commit">
|
||||
{% if me.running %}<span class="commit" title="running {{ me.running }}">{{ me.running[:7] }}</span>{% endif %}
|
||||
{% if me.latest and me.latest != me.running %}<span class="time"> → {{ me.latest[:7] }}</span>{% endif %}
|
||||
</td>
|
||||
<td data-label="last check"><span class="time" title="{{ me.last_check|pretty }}">{{ me.last_check|ago }}</span></td>
|
||||
<td data-label="last deploy"><span class="time" title="started {{ me.started|pretty }}">{{ me.started|ago }}</span></td>
|
||||
<td class="actions-cell"><span class="time" title="push to {{ me.remote }}/{{ me.branch }} and it pulls + rebuilds itself">auto · {{ me.remote }}/{{ me.branch }}</span></td>
|
||||
</tr>
|
||||
{% if me.note and me.status in ('held', 'error') %}
|
||||
<tr class="{{ 'error-row' if me.status == 'error' else 'warn-row' }}"><td colspan="6"><span class="tree">└─ </span>{{ me.note }}</td></tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for r in rows %}
|
||||
{% set warn = r.missing_env and r.status != 'error' and not r.busy %}
|
||||
<tr class="repo {{ 'has-error' if r.status == 'error' and not r.busy }} {{ 'is-paused' if r.status == 'paused' }} {{ 'has-warn' if warn }}">
|
||||
|
||||
Reference in New Issue
Block a user