Implements Phase 1.5 — an embedded web UI using Go templates, Pico CSS (dark theme), and htmx for auto-refreshing stats and active sessions. Adds read query methods to the Store interface (GetDashboardStats, GetTopUsernames, GetTopPasswords, GetTopIPs, GetRecentSessions) with implementations for both SQLite and MemoryStore. Introduces the internal/web package with server, handlers, templates, and tests. Web server is opt-in via [web] config section and runs alongside SSH with graceful shutdown. Bumps version to 0.2.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
606 B
HTML
27 lines
606 B
HTML
{{define "active_sessions"}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>IP</th>
|
|
<th>Username</th>
|
|
<th>Shell</th>
|
|
<th>Connected</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .}}
|
|
<tr>
|
|
<td><code>{{truncateID .ID}}</code></td>
|
|
<td>{{.IP}}</td>
|
|
<td>{{.Username}}</td>
|
|
<td>{{.ShellName}}</td>
|
|
<td>{{formatTime .ConnectedAt}}</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr><td colspan="5">No active sessions</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{end}}
|