feat(ui): a host's "Full metrics" heads its page, and a resource's anomalies are one line with a way to review them (#6797)
The host page's link to the full metrics sat in the Agent card, under the anomaly card and the vitals strip, and was missed. It now heads the vitals strip at the top of the page. The anomaly card on the host, monitor, container and Traefik pages listed every anomaly of the last 30 days with its review form, reviewed ones included, and took over the top of the page. It is now one line: how many wait for review, which are out of their normal now, and a Review button to Alerts → Anomalies narrowed to that resource (?source=&resource=), where a review returns. It is hidden when nothing waits and nothing is going on. The callers fetch up to 100 rows so the count isn't capped at 10 or 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,10 +132,11 @@ async def host_detail(host_id: str):
|
||||
linkable_targets = (await db.execute(
|
||||
select(AnsibleTarget).where(AnsibleTarget.host_id.is_(None))
|
||||
.order_by(AnsibleTarget.name))).scalars().all()
|
||||
# The host's metric anomalies, its disks and interfaces included (#5740).
|
||||
# The host's metric anomalies, its disks and interfaces included
|
||||
# (#5740). The card counts those to review, so the limit is generous.
|
||||
anomalies = await anom.views(db, await anom.list_anomalies(
|
||||
db, source="host_agent", resource=host.name,
|
||||
since=datetime.now(timezone.utc) - timedelta(days=30), limit=10), links=False)
|
||||
since=datetime.now(timezone.utc) - timedelta(days=30), limit=100), links=False)
|
||||
|
||||
return await render_template(
|
||||
"hosts/detail.html",
|
||||
|
||||
Reference in New Issue
Block a user