package view import ( "fmt" "git.staur.ca/stobbsm/clustvirt/cluster" "git.staur.ca/stobbsm/clustvirt/view/components" "git.staur.ca/stobbsm/clustvirt/view/layouts" ) templ ClusterInfo(c *cluster.Cluster) { @layouts.Manager("ClustVirt", "Cluster Manager", components.DefaultNavBar) {

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) }
}