- Der Konfigurationstext bekommt eine Highlight-Ebene; die Vim-Syntax liegt unter syntax/ und wird als /static/junction.vim zum Download ausgeliefert. - UI-Texte und Kommentare sind auf Englisch (Repo-Konvention). - Snapshot, Requests, Spend und Config laufen über die vorhandenen Kontrollbefehle; /api/stream hält die Anzeige aktuell.
135 lines
4.6 KiB
HTML
135 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>junction</title>
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="brand">
|
|
<span class="dot" id="state"></span>
|
|
<h1>junction</h1>
|
|
<span class="sub" id="uptime">—</span>
|
|
</div>
|
|
<div class="numbers">
|
|
<div class="n"><b id="n-req">—</b><span>Requests/s</span></div>
|
|
<div class="n"><b id="n-tok">—</b><span>Tokens/s</span></div>
|
|
<div class="n"><b id="n-lat">—</b><span>Latency</span></div>
|
|
<div class="n"><b id="n-cost">—</b><span>Cost/h</span></div>
|
|
<div class="n"><b id="n-fail">—</b><span>Errors</span></div>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
<section class="card wide">
|
|
<h2>Throughput <small id="c-req"></small></h2>
|
|
<canvas id="g-requests" height="140"></canvas>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>Tokens <small id="c-tok"></small></h2>
|
|
<canvas id="g-tokens" height="140"></canvas>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Latency</h2>
|
|
<canvas id="g-latency" height="120"></canvas>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Request data</h2>
|
|
<canvas id="g-traffic" height="120"></canvas>
|
|
</section>
|
|
|
|
<section class="card wide" id="eps">
|
|
<h2>Endpoints</h2>
|
|
<table id="t-eps">
|
|
<thead><tr>
|
|
<th>Name</th><th>State</th><th class="num">ok</th><th class="num">Errors</th>
|
|
<th class="num">inflight</th><th class="num">last ms</th><th></th>
|
|
</tr></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>MCP Servers <small id="c-mcp"></small></h2>
|
|
<table id="t-mcp">
|
|
<thead><tr>
|
|
<th>Name</th><th>Address</th><th class="num">Tools</th>
|
|
<th class="num">Fetches</th><th class="num">Errors</th><th>Last</th>
|
|
</tr></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<p class="hint" id="mcp-hint">An agent connects to <code id="mcp-url">/mcp</code>
|
|
and sees all tools below — with the server name as prefix.</p>
|
|
<div id="mcp-tools" class="tools"></div>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>Keys & Month <small id="c-spend"></small></h2>
|
|
<table id="t-vkeys">
|
|
<thead><tr>
|
|
<th>Key</th><th>Models</th><th class="num">rpm</th>
|
|
<th class="num">Budget</th><th class="num">spent</th>
|
|
<th class="num">Requests</th><th class="num">denied</th>
|
|
</tr></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<div id="spend-detail" class="tools"></div>
|
|
<p class="hint">Costs come from the spend log, not estimates. A key without a limit
|
|
shows 0 — meaning “no limit”, not “unknown”.</p>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>Recent Requests <small id="req-stats"></small></h2>
|
|
<table id="t-req">
|
|
<thead><tr>
|
|
<th>Time</th><th>Model</th><th>Target</th><th class="num">Status</th>
|
|
<th class="num">ms</th><th>Cache</th><th class="num">in/out</th><th class="num">$</th>
|
|
</tr></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<p class="hint">One row per served request from the request log. <b>p95</b> and
|
|
<b>hit rate</b> apply to the displayed rows, not the whole day — what is not in
|
|
the log is not claimed here.</p>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>Rules <small id="c-rules"></small></h2>
|
|
<table id="t-rules">
|
|
<thead><tr>
|
|
<th class="num">#</th><th>Model</th><th>Path</th><th>Target</th>
|
|
<th class="num">need</th><th class="num">ctx</th><th></th>
|
|
</tr></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<form id="f-rule">
|
|
<input id="rule-text" placeholder='new rule, e.g. req for "deepseek-*" pass cloud'>
|
|
<button type="submit">set</button>
|
|
</form>
|
|
<p class="hint" id="rule-hint"></p>
|
|
</section>
|
|
|
|
<section class="card wide">
|
|
<h2>Configuration <small>applied immediately on save</small></h2>
|
|
<div class="editor-wrap">
|
|
<pre id="config-hl" aria-hidden="true" class="config-layer"></pre>
|
|
<textarea id="config" spellcheck="false" class="config-layer"></textarea>
|
|
</div>
|
|
<div class="row">
|
|
<button id="cfg-load">reload</button>
|
|
<button id="cfg-save" class="primary">validate & save</button>
|
|
<a class="hint" href="/static/junction.vim" download>Download junction.vim (Vim syntax)</a>
|
|
<span class="hint" id="cfg-hint"></span>
|
|
</div>
|
|
<p class="hint">Current configuration loads automatically. Syntax highlighting follows Junction syntax (see <code>syntax/junction.vim</code>).</p>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="/static/app.js"></script>
|
|
</body>
|
|
</html>
|