feat(dashboard): phase A widget clarity — threshold colours, host links, tooltips
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 7s
CI / integration (push) Successful in 2m20s
CI / publish (push) Successful in 56s

Milestone 72 phase A (clarity wins, no schema change):
- Add shared metric_style() macro in _macros.html: colours a numeric metric
  amber (>=warn) / red (>=crit) on the value ITSELF, not just the status dot.
  Defaults 80/90 for percentage gauges; load /core uses warn 80 / crit 100.
  Applied to CPU/mem/disk across host_agent panel + fleet widget + the unified
  hosts-overview widget.
- Link every host reference to the host hub (/hosts/<id>) in ping, dns,
  hosts-overview, host_agent fleet, and uptime widgets; status widget entries
  link to their own detail_url. All guarded on session.user_id so the public
  share view degrades to plain text (the bare href carries no share token).
- Fix truncation: title= tooltips on all names that ellipsis, plus a hover
  underline affordance on the now-clickable ping-name links.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 14:49:49 -04:00
parent 2ea8c2f9af
commit 5f92340c0c
9 changed files with 68 additions and 23 deletions
+7 -1
View File
@@ -22,7 +22,13 @@
{% set last = host_pings[-1] if host_pings else none %}
<div class="ping-row">
<div class="ping-meta">
<span class="ping-name">{{ host.name }}</span>
{# Link to the host hub for logged-in users; plain text on the public share view (no auth, no token on the href). #}
{% if session.user_id %}
<a class="ping-name" href="/hosts/{{ host.id }}" title="{{ host.name }}"
style="color:inherit;text-decoration:none;">{{ host.name }}</a>
{% else %}
<span class="ping-name" title="{{ host.name }}">{{ host.name }}</span>
{% endif %}
<span class="ping-addr">{{ host.address }}</span>
</div>
<div class="ping-pills">