Adds a version listing in the hub for each agent.

This commit is contained in:
theRealBassist
2024-08-19 17:45:15 -04:00
parent 7cf7b706c1
commit 19272c05bf
4 changed files with 13 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package agent
import (
"beszel"
"beszel/internal/entities/container"
"beszel/internal/entities/system"
"bytes"
@@ -143,6 +144,7 @@ func (a *Agent) getSystemStats() (*system.Info, *system.Stats) {
Cpu: systemStats.Cpu,
MemPct: systemStats.MemPct,
DiskPct: systemStats.DiskPct,
Vers: beszel.Version,
}
// add host info

View File

@@ -45,6 +45,7 @@ type Info struct {
Cpu float64 `json:"cpu"`
MemPct float64 `json:"mp"`
DiskPct float64 `json:"dp"`
Vers string `json:"v"`
}
// Final data structure to return to the hub