Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 55 additions & 53 deletions web/templates/internet/device-other.partial.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,64 @@
</p>
{{end}}

<p>
<abbr title="whether this device is managed by NetworkManager">
Managed
{{- /* make template ignore the line break */ -}}
</abbr>?
{{if $device.Managed}}
<span class="tag is-success">yes</span>
{{else}}
<span class="tag is-info">no</span>
{{end}}
</p>

<p>
<abbr title="whether the device is allowed to automatically connect to a known network">
Autoconnect
{{- /* make template ignore the line break */ -}}
</abbr>?
{{if $device.Autoconnect}}
<span class="tag is-success">yes</span>
{{else}}
<span class="tag is-info">no</span>
{{end}}
</p>

{{if and $device.Driver (not (eq $device.Driver "unknown"))}}
<p>Driver:</p>
<ul class="mt-0">
<li>Name: {{$device.Driver}}</li>
<li>Version: {{$device.DriverVersion}}</li>
</ul>
{{end}}

{{if and $device.FirmwareVersion (not (eq $device.FirmwareVersion "N/A"))}}
<p>Firmware:</p>
<ul class="mt-0">
<li>Version: {{$device.FirmwareVersion}}</li>
</ul>
{{end}}

{{if not $device.InterfaceFlags.HasNone}}
{{if eq (.Meta.Form.Get "mode") "advanced"}}
<p>
Interface flags:
{{if $device.InterfaceFlags.IsUp}}
<span class="tag is-success">
{{- /* make template ignore the line break */ -}}
<abbr title="enabled from the administrative point of view">up</abbr>
{{- /* make template ignore the line break */ -}}
</span>
<abbr title="whether this device is managed by NetworkManager">
Managed
{{- /* make template ignore the line break */ -}}
</abbr>?
{{if $device.Managed}}
<span class="tag is-success">yes</span>
{{else}}
<span class="tag is-info">no</span>
{{end}}
{{if $device.InterfaceFlags.IsLowerUp}}
<span class="tag is-success">
{{- /* make template ignore the line break */ -}}
<abbr title="physical link is up">physical up</abbr>
{{- /* make template ignore the line break */ -}}
</span>
</p>

<p>
<abbr title="whether the device is allowed to automatically connect to a known network">
Autoconnect
{{- /* make template ignore the line break */ -}}
</abbr>?
{{if $device.Autoconnect}}
<span class="tag is-success">yes</span>
{{else}}
<span class="tag is-info">no</span>
{{end}}
</p>

{{if and $device.Driver (not (eq $device.Driver "unknown"))}}
<p>Driver:</p>
<ul class="mt-0">
<li>Name: {{$device.Driver}}</li>
<li>Version: {{$device.DriverVersion}}</li>
</ul>
{{end}}

{{if and $device.FirmwareVersion (not (eq $device.FirmwareVersion "N/A"))}}
<p>Firmware:</p>
<ul class="mt-0">
<li>Version: {{$device.FirmwareVersion}}</li>
</ul>
{{end}}

{{if not $device.InterfaceFlags.HasNone}}
<p>
Interface flags:
{{if $device.InterfaceFlags.IsUp}}
<span class="tag is-success">
{{- /* make template ignore the line break */ -}}
<abbr title="enabled from the administrative point of view">up</abbr>
{{- /* make template ignore the line break */ -}}
</span>
{{end}}
{{if $device.InterfaceFlags.IsLowerUp}}
<span class="tag is-success">
{{- /* make template ignore the line break */ -}}
<abbr title="physical link is up">physical up</abbr>
{{- /* make template ignore the line break */ -}}
</span>
{{end}}
</p>
{{end}}
{{end}}
</turbo-frame>
4 changes: 2 additions & 2 deletions web/templates/internet/index.page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{{
template "internet/device-card.partial.tmpl" dict
"Device" $device
"Sections" (dict "basics" true)
"Sections" (dict "basics" true "other" true)
"CollapseAll" false
"WithTurboStreamSource" true
"Meta" $.Meta
Expand All @@ -122,7 +122,7 @@
{{
template "internet/device-card.partial.tmpl" dict
"Device" $device
"Sections" (dict "basics" true)
"Sections" (dict "basics" true "other" true)
"CollapseAll" false
"WithTurboStreamSource" true
"Meta" $.Meta
Expand Down
Loading