22 lines
547 B
Plaintext
22 lines
547 B
Plaintext
package components
|
|
|
|
import (
|
|
"fmt"
|
|
"git.staur.ca/stobbsm/clustvirt/lib/host"
|
|
)
|
|
|
|
// HostInfo is meant to be an HTMX response
|
|
templ HostInfo(h *host.Host) {
|
|
<body>
|
|
<div class={ "size-64" }>
|
|
@templ.Raw(h.ChartMemory())
|
|
</div>
|
|
<ul>
|
|
<li>Free: { fmt.Sprintf("%d MB", h.NodeMemory.Free / 1024) }</li>
|
|
<li>Cached: { fmt.Sprintf("%d MB", h.NodeMemory.Cached / 1024) }</li>
|
|
<li>Buffers: { fmt.Sprintf("%d MB", h.NodeMemory.Buffers / 1024) }</li>
|
|
<li>Total: { fmt.Sprintf("%d MB", h.NodeMemory.Total / 1024) }</li>
|
|
</ul>
|
|
</body>
|
|
}
|