move gh button + update agent display in table

This commit is contained in:
Henry Dollman
2024-08-20 14:04:09 -04:00
parent d053f16058
commit 87ab4961fd
8 changed files with 105 additions and 77 deletions

View File

@@ -141,10 +141,10 @@ func (a *Agent) getSystemStats() (*system.Info, *system.Stats) {
}
systemInfo := &system.Info{
Cpu: systemStats.Cpu,
MemPct: systemStats.MemPct,
DiskPct: systemStats.DiskPct,
Vers: beszel.Version,
Cpu: systemStats.Cpu,
MemPct: systemStats.MemPct,
DiskPct: systemStats.DiskPct,
AgentVersion: beszel.Version,
}
// add host info
@@ -164,7 +164,6 @@ func (a *Agent) getSystemStats() (*system.Info, *system.Stats) {
}
return systemInfo, systemStats
}
func (a *Agent) getDockerStats() ([]*container.Stats, error) {

View File

@@ -41,11 +41,11 @@ type Info struct {
Threads int `json:"t"`
CpuModel string `json:"m"`
// Os string `json:"o"`
Uptime uint64 `json:"u"`
Cpu float64 `json:"cpu"`
MemPct float64 `json:"mp"`
DiskPct float64 `json:"dp"`
Vers string `json:"v"`
Uptime uint64 `json:"u"`
Cpu float64 `json:"cpu"`
MemPct float64 `json:"mp"`
DiskPct float64 `json:"dp"`
AgentVersion string `json:"v"`
}
// Final data structure to return to the hub