A change Steward can't see happen (a config edited, a disk swapped) is recorded by whoever made it: what was done, its area, when (in the reader's own zone), the hosts, what it was done to and a detail. Its author or an admin edits or deletes it; recording, editing and deleting are audited and those audit rows stay off the timeline. log_change records one as "<user> via MCP", editable by the token's user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.4 KiB
HTML
25 lines
1.4 KiB
HTML
{# One timeline entry's parts, shared by the Timeline page and a host's card.
|
|
`item` is a timeline.service.view() row. #}
|
|
|
|
{# What happened: its kind, the sentence, a note, and the full record while it
|
|
is kept; a change the reader recorded (or any, for an admin) can be edited,
|
|
returning to `back`. #}
|
|
{% macro entry_what(item, back="/timeline/") -%}
|
|
{%- set e = item.entry -%}
|
|
<div>
|
|
{%- if item.kind_label %}<span class="tone-dim">{{ item.kind_label }} · </span>{% endif -%}
|
|
{{ e.summary }}
|
|
</div>
|
|
{%- if item.note %}<div class="field-hint" style="white-space:pre-line;">{{ item.note }}</div>{% endif %}
|
|
{%- if item.url %}<div class="field-hint"><a href="{{ item.url }}">Details</a></div>
|
|
{%- elif item.gone %}<div class="field-hint">Details no longer kept</div>{% endif %}
|
|
{%- if item.editable %}<div class="field-hint"><a href="/timeline/changes/{{ e.id }}/edit?back={{ back|urlencode }}">Edit</a></div>{% endif %}
|
|
{%- endmacro %}
|
|
|
|
{# Where: the hosts it happened on, each linked to its timeline, and what it happened to. #}
|
|
{% macro entry_where(e) -%}
|
|
{%- for h in e.hosts %}<a href="/timeline/?host={{ h|urlencode }}">{{ h }}</a>{{ ", " if not loop.last }}{% endfor -%}
|
|
{%- if e.subject and e.subject not in e.hosts %}{% if e.hosts %}<br>{% endif %}<span class="field-hint">{{ e.subject }}</span>{% endif -%}
|
|
{%- if not e.hosts and not e.subject %}<span class="tone-dim">—</span>{% endif -%}
|
|
{%- endmacro %}
|