dal-license-server/templates/pages/dashboard.html
djuka dc0114e4b7 Inicijalni commit: kompletna implementacija + dokumentacija + testovi
- Kompletna Go implementacija licencnog servera (19 Go fajlova)
- Klijentski API: activate, deactivate, validate
- Admin API: CRUD licence, stats, audit log
- Admin dashboard: htmx + Go templates
- RSA-2048 potpisivanje licencnih podataka
- Rate limiting i API key autentifikacija
- MySQL migracije i seed podaci (ESIR, ARV, LIGHT_TICKET)
- Unit testovi: keygen, crypto, model, middleware (24 testa)
- Dokumentacija: SPEC.md, ARCHITECTURE.md, SETUP.md, API.md, TESTING.md, README.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 07:42:25 +00:00

55 lines
1.8 KiB
HTML

{{define "dashboard.html"}}{{template "app" .}}{{end}}
{{define "page-title"}}Dashboard - DAL License Server{{end}}
{{define "page-content"}}
<h1>Dashboard</h1>
{{if .Stats}}
<div class="stats-grid">
{{range .Stats.ByProduct}}
<div class="stat-card">
<div class="stat-label">{{.ProductName}}</div>
<div class="stat-row"><span>Aktivne:</span> <strong>{{.Active}}</strong></div>
<div class="stat-row"><span>Istekle:</span> <strong>{{.Expired}}</strong></div>
<div class="stat-row"><span>Grace:</span> <strong>{{.InGrace}}</strong></div>
<div class="stat-row"><span>Trial:</span> <strong>{{.Trial}}</strong></div>
<div class="stat-row"><span>Aktivacija:</span> <strong>{{.ActiveActivations}}</strong></div>
</div>
{{end}}
</div>
{{end}}
{{if .Expiring}}
<h2>Isticu u narednih 7 dana</h2>
<table class="table">
<thead><tr><th>Kljuc</th><th>Proizvod</th><th>Firma</th><th>Istice</th></tr></thead>
<tbody>
{{range .Expiring}}
<tr>
<td><code>{{.LicenseKey}}</code></td>
<td>{{.ProductName}}</td>
<td>{{.CustomerName}}</td>
<td>{{.ExpiresAtFormatted}}</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
<h2>Poslednja aktivnost</h2>
<table class="table">
<thead><tr><th>Vreme</th><th>Akcija</th><th>Licenca</th><th>IP</th></tr></thead>
<tbody>
{{range .Recent}}
<tr>
<td>{{formatDate .CreatedAt}}</td>
<td><span class="badge badge-{{.Action}}">{{.Action}}</span></td>
<td>{{if .LicenseKey}}<code>{{.LicenseKey}}</code>{{else}}-{{end}}</td>
<td>{{.IPAddress}}</td>
</tr>
{{else}}
<tr><td colspan="4" class="text-center">Nema podataka</td></tr>
{{end}}
</tbody>
</table>
{{end}}