Skip to content

feat(serve): fleet overview in hardbox serve dashboard #136

@jackby03

Description

@jackby03

Summary

Extend the hardbox serve dashboard to render an aggregate fleet overview when JSON reports from hardbox fleet audit are present in the reports directory. No backend required — reads from local files.

Fleet view features

  • Host table — one row per host: hostname, last audit timestamp, compliance score, score delta vs previous run, regression indicator
  • Per-host drill-down — click a host to see its individual findings (reuse existing single-report view)
  • Score timeline — sparkline of compliance score over time per host, rendered from historical JSON files
  • Regression badge — visual indicator on hosts whose score dropped since last run

Detection logic

The dashboard auto-detects fleet reports by inspecting the JSON structure:

  • Single-host report: { "host": "...", "findings": [...] }
  • Fleet report: { "hosts": [ {"host": "...", "findings": [...]}, ... ] }

When fleet reports are present, the landing page shows the fleet overview instead of the single-report list.

Acceptance criteria

  • Fleet overview renders when fleet JSON reports are present in --reports-dir
  • Host table shows: hostname, score, delta, last audit time
  • Per-host drill-down navigates to existing single-host findings view
  • Score timeline sparkline rendered per host from historical data
  • Graceful fallback to single-report view when no fleet reports found
  • No external dependencies — all assets embedded, no JS framework CDN calls
  • Tests cover: fleet report detection, score delta calculation
  • Docs: docs/SERVE.md updated with fleet overview section

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.5Scoped to the v0.5 release

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions