2
0

feat: Add runner health UI - unhealthy status display and CPU monitoring tile

- Add unhealthy status display on runners list page (yellow color when online but unhealthy)
- Add is_healthy field to RunnersStatusJSON API response
- Add CPUInfo struct to RunnerCapability for CPU load monitoring
- Add CPU tile to runner edit page showing load percentage and CPU count
- Add real-time JavaScript polling for CPU tile updates
- Add locale string for unhealthy status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
GitCaddy
2026-01-14 09:09:44 +00:00
parent 8a904de418
commit ba5d406157
6 changed files with 72 additions and 4 deletions

View File

@@ -21,6 +21,15 @@ type DiskInfo struct {
UsedPercent float64 `json:"used_percent"`
}
// CPUInfo holds CPU load information for a runner
type CPUInfo struct {
NumCPU int `json:"num_cpu"`
LoadAvg1m float64 `json:"load_avg_1m"`
LoadAvg5m float64 `json:"load_avg_5m"`
LoadAvg15m float64 `json:"load_avg_15m"`
LoadPercent float64 `json:"load_percent"`
}
// DistroInfo holds Linux distribution information
type DistroInfo struct {
ID string `json:"id,omitempty"` // e.g., "ubuntu", "debian", "fedora"
@@ -52,6 +61,7 @@ type RunnerCapability struct {
Features *CapabilityFeatures `json:"features,omitempty"`
Limitations []string `json:"limitations,omitempty"`
Disk *DiskInfo `json:"disk,omitempty"`
CPU *CPUInfo `json:"cpu,omitempty"`
Bandwidth *BandwidthInfo `json:"bandwidth,omitempty"`
SuggestedLabels []string `json:"suggested_labels,omitempty"`
}