package view import ( "fmt" "git.staur.ca/stobbsm/clustvirt/cluster" ) templ ClusterInfo(c *cluster.Cluster) {

Cluster Stats

@ClusterStats(cluster.InitStats(c)) } templ ClusterStats(cs *cluster.ClusterStats) { @CPUStats(cs.CPU, cs.Diff().CPU) } templ CPUStats(stats cluster.CPUStats, diff cluster.CPUDiff) {
CPU stats
Sockets Cores Threads Allocated MHz
Latest { fmt.Sprint(stats.Sockets) } { fmt.Sprint(stats.Cores) } { fmt.Sprint(stats.Threads) } { fmt.Sprint(stats.Allocated) } { fmt.Sprint(stats.MHz) }
Change { fmt.Sprint(diff.Sockets) } { fmt.Sprint(diff.Cores) } { fmt.Sprint(diff.Threads) } { fmt.Sprint(diff.Allocated) } { fmt.Sprint(diff.MHz) }
}