Skip to content

Work / Scrvio / Wiki / Surfaces

admin-metrics

Surfacecanonicalverified 2026-10-04

SURFACE.WEB.ADMIN-METRICS

Summary

System-wide counts: users, recordings, storage and health.

Raw wireframe

  • .context/designs/web/admin/metrics.html
  • .context/designs/web/admin/metrics-loading.html

Why it is drawn this way

Capacity is a hard-coded 1 TB. defaultStorageCapacity = 1024n ** 4 in the page; the comment says it would come from configuration. The percentage and "available" figure are computed against it.

The capacity label prints "1 undefined". formatBytes only knows B, KB, MB and GB, so 1 TB indexes past the array. The drawing shows what the app prints.

Health text is two literals. "All systems operational" is fixed text on the page. The server also sets systemHealth = "HEALTHY" as a constant (metrics.service.ts), so DEGRADED and DOWN colours exist but cannot occur.

"Export Report" does nothing. The Button has no onClick. It is drawn as a button, not a link.

Counts are unformatted in two places. The big numbers use toLocaleString(); the per-type line and the distribution rows print raw integers.

The last card has no top margin. Recording Type Distribution sits flush under Storage Capacity. The storage bar is a green-to-amber gradient in the app; the drawing uses the success token.

Loading is drawn; error is not. Four CardSkeletons with no Export button. The error state is an ErrorCard titled "Error loading metrics".

Related

Sources

  • apps/website/src/app/admin/metrics/page.tsx
  • packages/ui/src/utils/format.utils.ts
  • apps/server/src/api/00-metrics/metrics.service.ts