mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
Improve system information retrieval for macOS and Windows
- Introduce `Os` enum to represent supported operating systems. - Update `SystemInfo` interface to include OS type. - Refactor `ContainerChart` component to use `ChartType` enum for better clarity. - Switched to dynamic units in container memory chart.
This commit is contained in:
@@ -64,6 +64,14 @@ type NetIoStats struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
type Os uint8
|
||||
|
||||
const (
|
||||
Linux Os = iota
|
||||
Darwin
|
||||
Windows
|
||||
)
|
||||
|
||||
type Info struct {
|
||||
Hostname string `json:"h"`
|
||||
KernelVersion string `json:"k,omitempty"`
|
||||
@@ -79,6 +87,7 @@ type Info struct {
|
||||
Podman bool `json:"p,omitempty"`
|
||||
GpuPct float64 `json:"g,omitempty"`
|
||||
DashboardTemp float64 `json:"dt,omitempty"`
|
||||
Os Os `json:"os"`
|
||||
}
|
||||
|
||||
// Final data structure to return to the hub
|
||||
|
||||
Reference in New Issue
Block a user