Files
MeshTender/internal/core/templates/command_log.html
T
2026-07-30 08:46:19 -04:00

54 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{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}}