package views import ( "fmt" "vctp/components/core" ) type VmTraceEntry struct { Snapshot string RawTime int64 Name string VmId string VmUuid string Vcenter string ResourcePool string VcpuCount int64 RamGB int64 ProvisionedDisk float64 CreationTime string DeletionTime string } type VmTraceChart struct { ConfigJSON string } type VmTraceMeta struct { ViewType string TypeLabel string HourlyLink string DailyLink string HourlyClass string DailyClass string } templ VmTracePage(query string, display_query string, vm_id string, vm_uuid string, vm_name string, creationLabel string, deletionLabel string, creationApprox bool, entries []VmTraceEntry, chart VmTraceChart, meta VmTraceMeta) { @core.Header()
VM Trace

Snapshot history{display_query}

Timeline of vCPU, RAM, and resource pool changes across { meta.TypeLabel } snapshots.

Clear

{ meta.TypeLabel } Timeline

{len(entries)} samples
if chart.ConfigJSON != "" {
}

Creation time

{creationLabel}

if creationApprox {

Approximate (earliest snapshot)

}

Deletion time

{deletionLabel}

for _, e := range entries { }
Snapshot VM Name VmId VmUuid Vcenter Resource Pool vCPUs RAM (GB) Disk
{e.Snapshot} {e.Name} {e.VmId} {e.VmUuid} {e.Vcenter} {e.ResourcePool} {e.VcpuCount} {e.RamGB} {fmt.Sprintf("%.1f", e.ProvisionedDisk)}
@core.Footer() }