morffix/tmpl/index.tmpl
adroslice 332e0cbe5a Reworked CSS
- Split into 4 files referenced by the first
- Using MLFE and page-wide color definitions
- Improved consistency and reduced markup complexity
- Hinted more user actions
- Improved visual parsability of tables and logs
- Improved visibility of counter units
- TODO:
  - Add text selection to important fields
  - Improve button placement
  - Reindent templates
2024-05-29 15:19:21 +02:00

86 lines
No EOL
2 KiB
Cheetah

{{template "head"}}
<div class="counter">
{{ $l := len .Counter }}
{{range $i, $c := .Counter}}
<img class="counter-image" alt="{{$c}}" src="/static/counter/{{$c}}.gif">
{{ $n := sub $l $i }}
{{ if eq $n 4 }}
KB
{{ else if eq $n 7 }}
MB
{{ else if eq $n 10 }}
GB
{{ else if eq $n 13 }}
TB
{{end}}
{{end}}
</div>
<h2>Workers</h2>
<div class="workers">
{{range $w := .Workers}}
<div>
<h4>{{ $w.Name }}</h4>
<table>
<tr>
<td>
Address
</td>
<td>
{{ $w.Address }}
</td>
</tr>
<tr>
<td>
Connected
</td>
<td>
{{ $w.Connected }}
</td>
</tr>
<tr>
<td>
ConnectionChanged
</td>
<td>
{{ $w.ConnectionChanged }}
</td>
</tr>
{{if $w.Connected}}
<tr>
<td>
CPUs
</td>
<td>
{{ $w.Status.CPUCount }}
</td>
</tr>
<tr>
<td>
CPU Usage
</td>
<td>
{{ $w.Status.CPUUsage }}%
</td>
</tr>
<tr>
<td>
Memory
</td>
<td>
{{ $w.Status.MemoryTotal }} GB
</td>
</tr>
<tr>
<td>
Memory Usage
</td>
<td>
{{ $w.Status.MemoryUsage }}%
</td>
</tr>
{{end}}
</table>
</div>
{{end}}
</div>
{{template "tail"}}