The Sites page shows sites on an OpenStreetMap map (Leaflet 1.9.4 in the binary, checked against cdnjs's SRI; the CSP allows OSM tiles and the tile layer sends a referrer as OSM's policy asks). A site opens its rooms, a room its floor plan: racks on 600 mm tiles, one wide and two deep, front edge marked, coloured by their machines with a bar for the units used; a rack opens its front, and the rack is part of the URL. An edit mode drags racks into place and rotates them; racks nobody placed are laid out in rows facing alternate aisles. With NetBox as the IPAM authority, sites (coordinates, address), locations and racks are read on every reconcile, never written back. Otherwise sites are placed by clicking the map. Rack positions are Rollcall's (NetBox has none). Checked in headless Chrome with a synthetic site, including a scripted drag, rotate and save of a rack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.5 KiB
HTML
58 lines
2.5 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Rollcall</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<div class="shell">
|
|
<nav class="side">
|
|
<div class="brand">Rollcall<span class="muted">bare-metal fleet</span></div>
|
|
<a href="#/overview" data-nav="overview">Overview</a>
|
|
<a href="#/machines" data-nav="machines">Machines <span class="count" id="n-machines"></span></a>
|
|
<a href="#/sites" data-nav="sites">Sites</a>
|
|
<a href="#/racks" data-nav="racks">Racks <span class="count" id="n-racks"></span></a>
|
|
<a href="#/network" data-nav="network">Network <span class="count" id="n-net"></span></a>
|
|
<a href="#/jobs" data-nav="jobs">Jobs <span class="count" id="n-jobs"></span></a>
|
|
<a href="#/tags" data-nav="tags">Tags</a>
|
|
<a href="#/profiles" data-nav="profiles">Profiles</a>
|
|
<a href="#/images" data-nav="images">OS images</a>
|
|
<div class="side-foot">
|
|
<span id="status" class="muted"></span>
|
|
<button id="logout" class="btn ghost" title="forget the admin token">Token</button>
|
|
</div>
|
|
</nav>
|
|
|
|
<main id="main"></main>
|
|
</div>
|
|
|
|
<dialog id="login">
|
|
<form method="dialog">
|
|
<h2>Admin token</h2>
|
|
<p class="muted">The <code>admin_token</code> from the server's <code>config.json</code>. Stored only in this browser. Or use an admin client certificate (<code>rollcall admin-cert request NAME</code>) and the browser signs you in by itself.</p>
|
|
<p id="http-warn" class="warn" hidden>This page came over plain HTTP: the token crosses the network unencrypted. Use <a id="https-link" href="#">HTTPS</a> after trusting the installation's <a href="/ca.pem">CA certificate</a> <span id="ca-fp" class="mono muted"></span>.</p>
|
|
<input id="token" type="password" autocomplete="off" placeholder="token" required>
|
|
<menu><button class="btn primary" value="ok">Sign in</button></menu>
|
|
</form>
|
|
</dialog>
|
|
|
|
<!-- generic action dialog: filled by JS -->
|
|
<dialog id="dlg">
|
|
<form method="dialog" id="dlg-form">
|
|
<h2 id="dlg-title"></h2>
|
|
<div id="dlg-body" class="kv form"></div>
|
|
<p id="dlg-note" class="muted"></p>
|
|
<menu><button class="btn ghost" value="cancel" type="button" id="dlg-cancel">Cancel</button><button class="btn primary" value="ok" id="dlg-ok">OK</button></menu>
|
|
</form>
|
|
</dialog>
|
|
|
|
<div id="toast" hidden></div>
|
|
<script src="topo.js"></script>
|
|
<script src="netview.js"></script>
|
|
<script src="sites.js"></script>
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|