small pixel drawing of a pufferfish gore

internal/assets/overview.tmpl

{{ template "header.tmpl" . }}

<div class="row">
<div class="col-md-12">

<p>Add a new service:</p>
<form action="/add" method="POST">
    <input type="text" name="path" placeholder="Go module URL" required style="width: 300px;">
	<button type="submit">Add</button>
</form>

<h1>services</h1>

<table class="table">
<tbody><tr>
<th width="20%">path</th>
<th width="8%">status</th>
<th width="72%">last log line</th>
</tr>

{{ range $idx, $svc := .Services }}
<tr>
<td>
<a href="/status?path={{ $svc.Name }}">{{ $svc.Name }}</a>
</td>
<td>
{{ if restarting $svc.Started }}
<span class="label label-danger">restarting</span>
{{ end }}
{{ if $svc.Stopped }}
<span class="label label-default">stopped</span>
{{ else if not (restarting $svc.Started) }}
<span class="label label-success">running</span>
{{ end }}
</td>
<td class="lastlog">
{{ if $svc.Stdout.Lines }}
<small>stdout: </small>{{last $svc.Stdout.Lines }}<br/>
{{ end }}
{{ if $svc.Stderr.Lines }}
<small>stderr: </small>{{last $svc.Stderr.Lines }}<br/>
{{ end }}
</td>
</tr>
{{ end }}

</table>
</div>
<div class="col-md-12">
<h2>memory</h2>
{{ megabytes (index .Meminfo "MemTotal") }} total, {{ megabytes (index .Meminfo "MemAvailable") }} available<br>
<strong>resident set size (RSS) by service</strong>:
<div class="progress">

{{ with $rss := initRss }}
<div class="progress-bar" style="width: {{ rssPercentage $.Meminfo $rss }}%" title="init uses {{ megabytes $rss }} RSS">
<span class="sr-only"></span>
init
</div>
{{ end }}

{{ range $idx, $svc := .Services }}
{{ with $rss := $svc.RSS }}
<div class="progress-bar" style="width: {{ rssPercentage $.Meminfo $rss }}%" title="{{ $svc.Name }} uses {{ megabytes $rss }} RSS">
<span class="sr-only"></span>
{{ baseName $svc.Name }}
</div>
{{ end }}
{{ end }}
<div class="progress-bar" style="width: 100%; overflow:initial; float: none" title="memory usage outside of gokrazy services">
<span class="sr-only"></span>
unaccounted
</div>
</div>
</div>

<div class="col-md-12">


<h2>storage</h2>

<h2>private network addresses</h2>

<h2>public network addresses</h2>


</div>
</div>

{{ template "footer.tmpl" . }}