dal-license-server/templates/pages/licenses.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

56 lines
1.9 KiB
HTML

{{define "licenses.html"}}{{template "app" .}}{{end}}
{{define "page-title"}}Licence - DAL License Server{{end}}
{{define "page-content"}}
<div class="page-header">
<h1>Licence</h1>
<a href="/licenses/new" class="btn btn-primary">Nova licenca</a>
</div>
<form method="GET" action="/licenses" class="filter-form">
<select name="product">
<option value="">Svi proizvodi</option>
{{range .Products}}
<option value="{{.Code}}" {{if eq $.Product .Code}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<select name="status">
<option value="">Svi statusi</option>
<option value="active" {{if eq .Status "active"}}selected{{end}}>Aktivne</option>
<option value="expired" {{if eq .Status "expired"}}selected{{end}}>Istekle</option>
<option value="revoked" {{if eq .Status "revoked"}}selected{{end}}>Opozvane</option>
<option value="trial" {{if eq .Status "trial"}}selected{{end}}>Trial</option>
</select>
<input type="text" name="search" placeholder="Pretraga po firmi..." value="{{.Search}}">
<button type="submit" class="btn">Filtriraj</button>
</form>
<table class="table">
<thead>
<tr>
<th>Kljuc</th>
<th>Proizvod</th>
<th>Firma</th>
<th>Tip</th>
<th>Istice</th>
<th>Aktivacija</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{{range .Licenses}}
<tr>
<td><a href="/licenses/{{.ID}}"><code>{{.LicenseKey}}</code></a></td>
<td>{{.ProductCode}}</td>
<td>{{.CustomerName}}</td>
<td>{{.LicenseType}}</td>
<td>{{.ExpiresAtFormatted}}</td>
<td>{{.ActiveActivations}}</td>
<td><span class="badge {{.StatusClass}}">{{.StatusText}}</span></td>
</tr>
{{else}}
<tr><td colspan="7" class="text-center">Nema licenci</td></tr>
{{end}}
</tbody>
</table>
{{end}}