feat(machine): add OS and kernel version information to machine info, show in 'machine ls'

This commit is contained in:
Pasha Sviderski
2026-06-24 17:57:20 +10:00
parent 9ea30e6ee9
commit ad43569fe5
8 changed files with 574 additions and 230 deletions
+15 -2
View File
@@ -40,7 +40,8 @@ func list(ctx context.Context, uncli *cli.CLI) error {
// Print the list of machines in a table format.
t := tui.NewTable()
t.Headers("NAME", "STATE", "ADDRESS", "PUBLIC IP", "WIREGUARD ENDPOINTS", "ARCH", "VERSION", "DOCKER", "MACHINE ID")
t.Headers("NAME", "STATE", "ADDRESS", "PUBLIC IP", "WIREGUARD ENDPOINTS",
"OS", "KERNEL", "ARCH", "DOCKER", "VERSION", "MACHINE ID")
for _, member := range machines {
m := member.Machine
@@ -64,6 +65,16 @@ func list(ctx context.Context, uncli *cli.CLI) error {
arch = m.Arch
}
osName := "-"
if m.OsPrettyName != "" {
osName = m.OsPrettyName
}
kernel := "-"
if m.KernelVersion != "" {
kernel = m.KernelVersion
}
daemonVersion := "-"
if m.DaemonVersion != "" {
daemonVersion = m.DaemonVersion
@@ -80,9 +91,11 @@ func list(ctx context.Context, uncli *cli.CLI) error {
subnet.String(),
publicIP,
strings.Join(endpoints, tui.Faint.Render(", ")),
osName,
kernel,
arch,
daemonVersion,
dockerVersion,
daemonVersion,
member.Machine.Id,
)
}