hub v0.154.0: the host page shows each storage place's physical disk(s) and whether the agent proved them (16 §3)
gates / gates (push) Successful in 6m43s

Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
admin committed 2026-10-15 21:28:05 +02:00
1 parent 6749118cc8
commit 4c9bb5f198
6 files changed
+88 -9

No files matched your search

+19 -8
View File
@@ -480,6 +480,12 @@ type storageTargetView struct {
SmartHealth string
TempC *int
WearPct *int // NVMe percentage_used
// Physical-disk identity (agent v0.157.0, `16` §3): the disk keys under the place and whether the agent
// can prove them. Empty from an older agent.
Kind string
PhysicalDisks []string
Identity string
IdentityReason string
}
// parseHostStorageTargets extracts the rich storage-target rows from a report body. A
@@ -491,14 +497,18 @@ func parseHostStorageTargets(reportJSON string) []storageTargetView {
}
var body struct {
StorageTargets []struct {
Name string `json:"name"`
Type string `json:"type"`
Role string `json:"role"`
State string `json:"state"`
MountPath string `json:"mount_path"`
Reachable bool `json:"reachable"`
UsedFraction float64 `json:"used_fraction"`
ThinPool *struct {
Name string `json:"name"`
Type string `json:"type"`
Role string `json:"role"`
State string `json:"state"`
MountPath string `json:"mount_path"`
Reachable bool `json:"reachable"`
UsedFraction float64 `json:"used_fraction"`
Kind string `json:"kind"`
PhysicalDisks []string `json:"physical_disks"`
Identity string `json:"identity"`
IdentityReason string `json:"identity_reason"`
ThinPool *struct {
DataUsedFraction float64 `json:"data_used_fraction"`
} `json:"thin_pool"`
Smart struct {
@@ -517,6 +527,7 @@ func parseHostStorageTargets(reportJSON string) []storageTargetView {
MountPath: t.MountPath, Reachable: t.Reachable,
FillPct: t.UsedFraction * 100,
SmartHealth: t.Smart.Health, TempC: t.Smart.TemperatureC, WearPct: t.Smart.PercentageUsed,
Kind: t.Kind, PhysicalDisks: t.PhysicalDisks, Identity: t.Identity, IdentityReason: t.IdentityReason,
}
if t.ThinPool != nil {
v.HasThin = true