{{define "configure-hardware.html"}} {{template "base" .}} {{end}} {{define "content"}}
{{if .Loading}}
Downloading YANG schema from device… this takes a moment on first login.
{{template "configure-toolbar" .}}
{{else}} {{if .Error}}
{{.Error}}
{{end}}
Hardware Status →
{{range $i, $c := .Configured}} {{end}} {{if not .Configured}} {{end}} {{if .HasAvailable}} {{/* Hidden add row */}} {{end}}
Name Class Description State
{{$c.ClassDisplay}} {{if $c.Description}}{{$c.Description}}{{else}}{{end}} {{if $c.IsUSB}} {{if $c.Unlocked}}unlocked {{else}}locked{{end}} {{else if $c.IsWiFi}} {{$c.CountryCode}}{{if $c.Band}} · {{$c.Band}}{{end}} {{else if $c.IsGPS}} configured {{else}}{{end}}
{{if $c.IsUSB}}{{template "hw-usb-form" $c}}{{end}} {{if $c.IsWiFi}}{{template "wifi-radio-form" $c}}{{end}} {{if $c.IsGPS}}{{template "hw-gps-form" $c}}{{end}}
No hardware components configured yet{{if .HasAvailable}} — use Add hardware below to configure detected devices{{end}}.
{{if .HasAvailable}} {{end}}
{{template "configure-toolbar" .}} {{end}}{{/* else schema ready */}} {{end}} {{define "hw-usb-form"}} {{$p := printf "/ietf-hardware:hardware/component=%s" .Name}}
Description{{template "field-info" .DescDescription}}
State{{template "field-info" .DescAdminState}}
{{end}} {{define "wifi-radio-form"}} {{$p := printf "/ietf-hardware:hardware/component=%s" .Name}} {{$rp := printf "%s/infix-hardware:wifi-radio" $p}}
Description{{template "field-info" .DescDescription}}
Country code{{template "field-info" .DescCountry}}
Band{{template "field-info" .DescBand}}
Channel{{template "field-info" .DescChannel}}
{{end}} {{define "hw-gps-form"}} {{$p := printf "/ietf-hardware:hardware/component=%s" .Name}}
Description{{template "field-info" .DescDescription}}
{{end}}