- Use bindata to package static file content in to the frontend binary

- Add golang templates to move HTML rendering out of the go code where possible
- Add an endpoint for serving static files
- Add URL escaping for servers and targets
This commit is contained in:
Simon Marsh
2021-01-11 13:13:21 +00:00
parent 8d0e210572
commit 6179c688be
19 changed files with 463 additions and 229 deletions

View File

@@ -0,0 +1,26 @@
{{ $ServerName := urlquery .ServerName }}
<table class="table table-striped table-bordered table-sm">
<thead>
{{ range .Header }}
<th scope="col">{{ html . }}</th>
{{ end }}
</thead>
<tbody>
{{ range .Rows }}
<tr class="table-{{ .MappedState }}">
<td><a href="/detail/{{ $ServerName }}/{{ urlquery .Name }}">{{ html .Name }}</a></td>
<td>{{ .Proto }}</td>
<td>{{ .Table }}</td>
<td>{{ .State }}</td>
<td>{{ .Since }}</td>
<td>{{ .Info }}</td>
</tr>
{{ end }}
</tbody>
</table>
<!--
{{ .Raw }}
-->