{{ $height := .height | default "600px" }} {{ $title := .title | default "" }} {{ $units := .units | default (slice) }}
{{ if $title }}
{{ $title }}
{{ end }} {{ if $units }} {{ range $units }} {{ if eq .type "server" }}
{{ if .label }}
{{ .label }}
{{ end }}
{{ range seq (.drives | default 2) }}
{{ end }}
{{ else if eq .type "switch" }}
{{ if .label }}
{{ .label }}
{{ end }}
{{ range seq (.ports | default 24) }}
{{ end }}
{{ else if eq .type "patch-panel" }}
{{ if .label }}
{{ .label }}
{{ end }}
{{ range seq (.ports | default 24) }}
{{ end }}
{{ else if eq .type "ups" }}
{{ if .label }}
{{ .label }}
{{ end }}
{{ .capacity | default "100" }}%
{{ else if eq .type "storage" }}
{{ if .label }}
{{ .label }}
{{ end }}
{{ range seq (.drives | default 12) }}
{{ end }}
{{ else if eq .type "blank" }}
{{ else if eq .type "spacer" }}
{{ end }} {{ end }} {{ else }} {{ range seq 8 }}
{{ end }} {{ end }}