7f7868f7cf
---ci--- phase: 5 milestone: v0.1 status: complete requirements: covered: [REQ-01, REQ-02, REQ-03, REQ-04, REQ-05, REQ-06, REQ-07, REQ-08, REQ-09, REQ-10, REQ-11, REQ-12, REQ-13, REQ-14, REQ-15, REQ-16, REQ-17, REQ-18, REQ-19, REQ-20] partial: [] ---/ci---
64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Dashboard — CoreCI Broker</title>
|
|
<link rel="stylesheet" href="/ui/shared.css">
|
|
</head>
|
|
<body>
|
|
<div id="nav"></div>
|
|
<main class="wrap">
|
|
<section class="card">
|
|
<h1>Dashboard</h1>
|
|
<p>Signed in as <strong id="who">…</strong></p>
|
|
</section>
|
|
<section class="card status-strip">
|
|
<span class="dot" id="status-dot" aria-hidden="true"></span>
|
|
<span id="status-text" aria-live="polite">Broker status: checking…</span>
|
|
</section>
|
|
<section class="card">
|
|
<h2>Quick links</h2>
|
|
<div class="link-grid">
|
|
<a class="link-card" href="/ui/app_registrations">
|
|
<strong>App Registrations</strong>
|
|
<span>Add, revoke, and reinstate tool app UUIDs</span>
|
|
</a>
|
|
<a class="link-card" href="/ui/user_allowlist">
|
|
<strong>User Allowlist</strong>
|
|
<span>Manage the user ids allowed to register</span>
|
|
</a>
|
|
<a class="link-card" href="/ui/audit">
|
|
<strong>Audit Log</strong>
|
|
<span>Review broker activity, read-only</span>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<script src="/ui/nav.js"></script>
|
|
<script>
|
|
(async function () {
|
|
var who = document.getElementById("who");
|
|
var dot = document.getElementById("status-dot");
|
|
var text = document.getElementById("status-text");
|
|
var session = await api("/api/broker/auth/whoami");
|
|
if (session.ok && session.data) {
|
|
who.textContent = session.data.username || "unknown";
|
|
} else {
|
|
who.textContent = "unavailable";
|
|
}
|
|
var health = await api("/healthz");
|
|
if (health.ok) {
|
|
dot.className = "dot dot-ok";
|
|
text.textContent = "Broker status: healthy";
|
|
} else if (health.status === 0) {
|
|
dot.className = "dot dot-down";
|
|
text.textContent = "Broker status: unreachable";
|
|
} else {
|
|
dot.className = "dot dot-down";
|
|
text.textContent = "Broker status: unhealthy";
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html> |