licence-server/templates/pages/license-detail.html
Nenad Djukic 1abe7176ec Preimenovanje: dal-license-server -> licence-server (+ debrendiranje)
Vlasnik izlazi iz DAL price za ovaj projekat - postaje samostalan proizvod.
Preimenovanje je mehanicko (import putanje, imena fajlova/baze/UI naslova),
NIJEDNA linija poslovne logike u internal/handler ili internal/service nije
dirana - go build, go vet i go test ./... prolaze cisto pod novim imenom.

- go.mod: module dal-license-server -> licence-server; 28 import linija u
  13 .go fajlova usaglaseno
- internal/config/config.go (+test): default DB_NAME licence_db
- HTML sabloni (7 stranica) + 7 Playwright e2e spec fajlova: "DAL License
  Server" -> "Licence Server" u title/nav-brand, testovi usaglaseni u istom
  prolazu (nista ne moze da se razdvoji)
- package.json/package-lock.json/.gitignore/.claude/project.json: ime
  projekta/binarnog fajla/work_dir
- Usput: package.json je u repository.url nosio OTVORENU Gitea lozinku u
  cistom tekstu - uklonjena (URL sad bez kredencijala). Lozinka je i dalje
  u staroj git istoriji - preporuka: rotirati je posebno.
- CLAUDE.md/README/API/TESTING/docs/SPEC/ARCHITECTURE/SETUP: naslovi, ASCII
  dijagrami, git clone URL, mysqldump primer, systemd predlozak u SETUP.md
  zamenjen stvarnim (obrazac terminia.service - journal log + graceful
  shutdown, ne stari minimalni predlozak)
- Debrendiranje: "Univerzalni licencni server za sve DAL proizvode" ->
  "za vise proizvoda i klijenata"; potpis "Nenad Djukic / DAL d.o.o." ->
  "Nenad Djukic". NE dirano: nazivi ESIR/ARV/LIGHT_TICKET (tudji proizvodi,
  ne DAL brend), "DAL" kao stvaran naziv org-a u RBAC modelu
  (docs/loggerservice/README.md) - to je podatak, ne branding ovog servera.
- docs/asp-terminia/, docs/loggerservice/: prozni pomeni imena servera

Baza (dal_license_db -> licence_db) i deploy na 151 idu u posebnom koraku,
posle preimenovanja Gitea repoa - vidi CLAUDE.md istorijsku belesku na dnu.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 07:55:26 +02:00

78 lines
3.3 KiB
HTML

{{define "license-detail.html"}}{{template "app" .}}{{end}}
{{define "page-title"}}Licenca {{.License.LicenseKey}} - Licence 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}}