fix 'node show' and 'shard explain' crashes (#86)

This commit is contained in:
T. von Dein
2026-07-09 13:41:07 +02:00
parent 1e9e419e9b
commit 53abe666e8
2 changed files with 27 additions and 14 deletions

View File

@@ -113,13 +113,19 @@ func NodeShow(conf *cfg.Config, nodename string) error {
}
k8snode := info.Attributes["k8s_node_name"]
rank := "none"
adsel, exists := stat.AdaptiveSelection[id]
if exists {
rank = *adsel.Rank
}
table.Entries = [][]any{
{"Id", id},
{"Name", nodename},
{"Kubernetes node", k8snode},
{"Ip address", info.Ip},
{"Node rank", *stat.AdaptiveSelection[id].Rank},
{"Node rank", rank},
{"JVM", info.Jvm.VmName + " " + info.Jvm.Version},
{"JVM Started", time.UnixMilli(info.Jvm.StartTimeInMillis)},
{"OS", info.Os.PrettyName + " " + info.Os.Version},