mirror of
https://github.com/MeshTender/MeshTender.git
synced 2026-09-02 01:38:17 +00:00
54 lines
2.2 KiB
HTML
54 lines
2.2 KiB
HTML
{{define "title"}}Activity · {{.Repeater.Name}} · MeshTender{{end}}
|
||
{{define "header"}}{{template "repeater-header" .Nav}}{{end}}
|
||
{{define "content"}}
|
||
{{template "repeater-tabs" .Nav}}
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<p class="text-secondary mb-0">
|
||
Commands grouped by console session (one modem connection). “Confirmed” means a reply came back;
|
||
no reply doesn't mean the command failed — it may have run without us hearing the response.
|
||
</p>
|
||
</div>
|
||
</div>
|
||
{{if .Sessions}}
|
||
<ul class="timeline mt-3">
|
||
{{range .Sessions}}
|
||
<li class="timeline-event">
|
||
<div class="timeline-event-icon">{{template "icon-terminal" ""}}</div>
|
||
<div class="card timeline-event-card">
|
||
<div class="card-body">
|
||
<div class="text-secondary float-end">{{ts .StartedAt "datetime"}}{{if .EndedAt}}–{{ts .EndedAt "time"}}{{else}} · in progress{{end}}</div>
|
||
<h2 class="mb-2 fs-3">{{if .SenderUsername}}<a class="text-reset" href="{{$.RootURL}}/u/{{.SenderUsername}}">{{.SenderName}}</a>{{else}}{{.SenderName}}{{end}}</h2>
|
||
<div class="table-responsive">
|
||
<table class="table table-vcenter">
|
||
<thead><tr><th>When</th><th>Command</th><th>Confirmed</th><th>Response</th></tr></thead>
|
||
<tbody>
|
||
{{range .Entries}}
|
||
<tr>
|
||
<td class="text-secondary">{{ts .SentAt "time-seconds"}}</td>
|
||
<td><code>{{.CommandText}}</code></td>
|
||
<td>{{if .AckReceived}}<span class="badge bg-success-lt">yes</span>{{else}}<span class="badge bg-yellow-lt">no reply</span>{{end}}</td>
|
||
<td><code class="text-wrap">{{if .ResponseText}}{{.ResponseText}}{{else}}—{{end}}</code></td>
|
||
</tr>
|
||
{{end}}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</li>
|
||
{{end}}
|
||
</ul>
|
||
{{if .NextBefore}}
|
||
<div class="text-center mt-3">
|
||
<a class="btn btn-outline-secondary" href="?before={{.NextBefore}}">Show older sessions</a>
|
||
</div>
|
||
{{end}}
|
||
{{else}}
|
||
<div class="card mt-3">
|
||
<div class="card-body"><p class="text-secondary mb-0">No commands have been sent yet.</p></div>
|
||
</div>
|
||
{{end}}
|
||
<a class="back-link mt-3" href="/">{{template "icon-arrow-left" "me-1"}}Back to dashboard</a>
|
||
{{end}}
|