- New endpoints: GET /api/v1/pools, GET /api/v1/pools/{slug}/next,
GET/POST /api/v1/allocations, GET /api/v1/allocations/{id},
POST /api/v1/allocations/{id}/release
- Bearer token auth; only SHA-256 hashes stored, plaintext shown once
- Token management GUI at /tokens (create, revoke, delete) linked in footer
- API actions audited with actor api:<token name>
- Fix latent transaction leak: replace manual BEGIN IMMEDIATE/COMMIT with
begin_with(), which rolls back on drop; previously a failed allocation
(e.g. disallowed prefix or full pool) returned a connection with an open
transaction to the pool, causing 'database is locked' on later writes
- README: API documentation with curl examples
38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="htmx-config" content='{"includeIndicatorStyles":false}'>
|
|
<title>{% block title %}SUB-ALIGATOR{% endblock %}</title>
|
|
<script src="/static/theme.js"></script>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<script src="/static/htmx.min.js" defer></script>
|
|
<script src="/static/app.js" defer></script>
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<div class="header-nav header-nav-left">
|
|
<a href="/" class="btn btn-secondary">Home</a>
|
|
</div>
|
|
<div class="header-nav header-nav-right">
|
|
<button type="button" id="theme-toggle" class="btn btn-secondary">[ Dark ]</button>
|
|
</div>
|
|
<h1>SUB-ALIGATOR</h1>
|
|
<p>Internal IPv4 subnet allocation and tracking</p>
|
|
</header>
|
|
{% block content %}{% endblock %}
|
|
<footer class="box">
|
|
<p class="small">
|
|
<a href="/pools">Manage pools</a> |
|
|
<a href="/tokens">API tokens</a> |
|
|
<a href="/exports/allocations.md">Markdown export</a> |
|
|
<a href="/exports/allocations.csv">CSV export</a> |
|
|
<a href="/exports/allocations.json">JSON export</a>
|
|
</p>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|