- 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>
78 lines
3.3 KiB
HTML
78 lines
3.3 KiB
HTML
{{define "license-detail.html"}}{{template "app" .}}{{end}}
|
|
{{define "page-title"}}Licenca {{.License.LicenseKey}} - DAL License Server{{end}}
|
|
{{define "page-content"}}
|
|
<div class="page-header">
|
|
<h1>Licenca: <code>{{.License.LicenseKey}}</code></h1>
|
|
<span class="badge {{.License.StatusClass}}">{{.License.StatusText}}</span>
|
|
</div>
|
|
|
|
<div class="detail-grid">
|
|
<div class="detail-card">
|
|
<h3>Informacije</h3>
|
|
<table class="detail-table">
|
|
<tr><td>Proizvod</td><td>{{.License.ProductName}} ({{.License.ProductCode}})</td></tr>
|
|
<tr><td>Tip</td><td>{{.License.LicenseType}}</td></tr>
|
|
<tr><td>Firma</td><td>{{.License.CustomerName}}</td></tr>
|
|
<tr><td>PIB</td><td>{{.License.CustomerPIB}}</td></tr>
|
|
<tr><td>Email</td><td>{{.License.CustomerEmail}}</td></tr>
|
|
<tr><td>Izdata</td><td>{{formatDate .License.IssuedAt}}</td></tr>
|
|
<tr><td>Istice</td><td>{{.License.ExpiresAtFormatted}}</td></tr>
|
|
<tr><td>Grace period</td><td>{{.License.GraceDays}} dana</td></tr>
|
|
<tr><td>Limiti</td><td><pre>{{jsonPretty .License.Limits}}</pre></td></tr>
|
|
<tr><td>Features</td><td><pre>{{jsonPretty .License.Features}}</pre></td></tr>
|
|
{{if .License.Notes}}<tr><td>Napomena</td><td>{{.License.Notes}}</td></tr>{{end}}
|
|
</table>
|
|
</div>
|
|
|
|
<div class="detail-card">
|
|
<h3>Akcije</h3>
|
|
{{if not .License.Revoked}}
|
|
<form method="POST" action="/licenses/{{.License.ID}}/revoke" class="action-form">
|
|
<input type="text" name="reason" placeholder="Razlog opoziva">
|
|
<button type="submit" class="btn btn-danger" onclick="return confirm('Da li ste sigurni?')">Opozovi licencu</button>
|
|
</form>
|
|
{{end}}
|
|
<form method="POST" action="/licenses/{{.License.ID}}/release" class="action-form">
|
|
<button type="submit" class="btn btn-warning" onclick="return confirm('Osloboditi aktivaciju?')">Force Release</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Aktivacije</h2>
|
|
<table class="table">
|
|
<thead><tr><th>Hostname</th><th>OS</th><th>Verzija</th><th>IP</th><th>Aktivirana</th><th>Poslednji put</th><th>Status</th></tr></thead>
|
|
<tbody>
|
|
{{range .Activations}}
|
|
<tr>
|
|
<td>{{.Hostname}}</td>
|
|
<td>{{.OSInfo}}</td>
|
|
<td>{{.AppVersion}}</td>
|
|
<td>{{.IPAddress}}</td>
|
|
<td>{{formatDate .ActivatedAt}}</td>
|
|
<td>{{formatDate .LastSeenAt}}</td>
|
|
<td>{{if .IsActive}}<span class="badge status-active">Aktivna</span>{{else}}<span class="badge status-expired">Deaktivirana</span>{{end}}</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr><td colspan="7" class="text-center">Nema aktivacija</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
|
|
<h2>Audit Log</h2>
|
|
<table class="table">
|
|
<thead><tr><th>Vreme</th><th>Akcija</th><th>IP</th><th>Detalji</th></tr></thead>
|
|
<tbody>
|
|
{{range .Audit}}
|
|
<tr>
|
|
<td>{{formatDate .CreatedAt}}</td>
|
|
<td><span class="badge badge-{{.Action}}">{{.Action}}</span></td>
|
|
<td>{{.IPAddress}}</td>
|
|
<td><pre class="audit-details">{{jsonPretty .Details}}</pre></td>
|
|
</tr>
|
|
{{else}}
|
|
<tr><td colspan="4" class="text-center">Nema podataka</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{end}}
|