fix template formatting

This commit is contained in:
2026-06-26 18:30:08 +00:00
parent 3f2964db55
commit 428d5d15a5
+27 -27
View File
@@ -1,34 +1,34 @@
{{define "pool-resources"}} {{define "pool-resources"}}
<section class="w3-card w3-padding"> <section class="w3-card w3-padding">
<h3>Pool: {{.PoolID}}</h3> <h3>Pool: {{.PoolID}}</h3>
<p id="vmid">VMID Range: {{.AllowedVMIDRange.Min}} - {{.AllowedVMIDRange.Max}}</p> <p id="vmid">VMID Range: {{.AllowedVMIDRange.Min}} - {{.AllowedVMIDRange.Max}}</p>
<p id="nodes">Nodes: {{MapKeys .AllowedNodes ", "}}</p> <p id="nodes">Nodes: {{MapKeys .AllowedNodes ", "}}</p>
<p id="backups">Max Backups Per Instance: {{.AllowedBackups.MaxPerInstance}} Max Backups Total: {{.AllowedBackups.MaxTotal}}</p> <p id="backups">Max Backups Per Instance: {{.AllowedBackups.MaxPerInstance}} Max Backups Total: {{.AllowedBackups.MaxTotal}}</p>
<div> <div>
{{range $category, $v := .Resources}} {{range $category, $v := .Resources}}
{{if eq $category ""}} {{if eq $category ""}}
<h4>Generic</h4> <h4>Generic</h4>
{{else}} {{else}}
<h4>{{$category}}</h4> <h4>{{$category}}</h4>
{{end}} {{end}}
<div class="resource-container"> <div class="resource-container">
{{range $v}} {{range $v}}
{{if .Display}} {{if .Display}}
{{if eq .Type "numeric"}} {{if eq .Type "numeric"}}
{{template "resource-chart" .}}
{{end}}
{{if eq .Type "storage"}}
{{template "resource-chart" .}}
{{end}}
{{if eq .Type "list"}}
{{range .Resources}}
{{template "resource-chart" .}} {{template "resource-chart" .}}
{{end}} {{end}}
{{if eq .Type "storage"}}
{{template "resource-chart" .}}
{{end}}
{{if eq .Type "list"}}
{{range .Resources}}
{{template "resource-chart" .}}
{{end}}
{{end}}
{{end}} {{end}}
{{end}} {{end}}
</div>
{{end}} {{end}}
</div> </div>
</section> {{end}}
</div>
</section>
{{end}} {{end}}