Tidy the dashboard and the forms around it

- Numeric column headers are right-aligned like their values; the
  stylesheet only aligned the cells, so "REQUESTS" sat nowhere near its
  numbers in every table that has them.
- Ranked bars are an HTML grid instead of a fixed-width SVG: the value
  had 96 units and "34.2k tok  114 req" did not fit, so the figure a
  reader came for was the one cut off. Labels ellipsise in CSS and give
  their full text on hover.
- Mean latency reads as 5 ms, 8.8 s or 1m 51s rather than 110695 ms.
- The "What the cluster is doing" charts sat between the Models heading
  and the models table; they now come before it.
- A fleet without GPUs shows its CPU capacity — nodes ready, memory,
  disk free for weights — instead of "No GPUs have been reported", and
  a node with no GPUs shows "—" rather than 0/0.
- The profile's forms are a form's width rather than the page's, and
  the quotas page's price warning is a boxed banner rather than a line
  of red text.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-09-28 18:08:16 +02:00
1 parent 5e1494f76d
commit c1926be869
8 files changed
+118 -66

No files matched your search

+25
View File
@@ -14,6 +14,9 @@ import (
// DashboardData is the whole page.
type DashboardData struct {
// CPU is the fleet's capacity when it has no GPUs, which is shown instead
// of a GPU table that would only say there are none.
CPU cpuCapacity
// Menu is the shared top menu; Nav below is what the cluster page adds.
Menu Nav
Nodes []adminapi.NodeView
@@ -152,6 +155,7 @@ func Dashboard(src Source, usage UsageSource, version string, refresh time.Durat
}
if src != nil {
d.Nodes = src.Nodes()
d.CPU = cpuCapacityOf(d.Nodes)
d.Models = src.Models()
d.Replicas = src.Replicas("")
d.NodeCount = len(d.Nodes)
@@ -321,3 +325,24 @@ func unplaced(src Source, models []adminapi.ModelView) []adminapi.ExplainView {
}
return out
}
// cpuCapacity is what a fleet without GPUs has to offer.
type cpuCapacity struct {
Nodes, Ready int
MemoryGB int
DiskFreeGB, DiskTotal int
}
func cpuCapacityOf(nodes []adminapi.NodeView) cpuCapacity {
var c cpuCapacity
for _, n := range nodes {
c.Nodes++
if n.State == "ready" {
c.Ready++
}
c.MemoryGB += n.MemoryGB
c.DiskFreeGB += n.DiskFreeGB
c.DiskTotal += n.DiskTotalGB
}
return c
}