27699a2469
Dashboard:
- New 'Always-on services' section with cards for Parakeet and Magpie
- Each card: host:port, model loaded, status pill (Healthy/Unhealthy/Starting/Not configured)
- Start, Restart, Stop buttons. Buttons disabled when not applicable for current state
- Restart counter shown when > 1 (would have surfaced the old magpie crash loop)
Backend:
- New /api/services GET: docker container state + http health for each support service
- New POST /api/services/{name}/{action} for start | stop | restart
- services.py module: docker_state, run_action via SSH
- config.py: PARAKEET_HOST/USER/CONTAINER and MAGPIE_* env vars, default to spark2_*
- health.py: use per-service hosts (no longer hard-wired to spark2_host)
Package:
- sparkConfig.yaml.ts: add 6 new optional fields
- configureSparks action: optional 'Parakeet host', 'Parakeet container', 'Magpie host', 'Magpie container' fields; descriptions explain they default to Spark 2 when blank
- Handler normalizes nulls to empty strings before merge
- main.ts: pass new env vars to container
- bump to 0.2.0:0
89 lines
3.1 KiB
HTML
89 lines
3.1 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="color-scheme" content="dark">
|
|
<title>spark-control</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div class="brand">
|
|
<span class="logo-dot"></span>
|
|
<span>spark-control</span>
|
|
</div>
|
|
<div class="current" id="current">
|
|
<span class="muted">connecting…</span>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
<section id="setup-banner" class="banner hidden">
|
|
<strong>Configuration needed.</strong>
|
|
<span>Run the <em>Configure Sparks</em> action in StartOS to set hostnames, then run <em>Test Connection</em>.</span>
|
|
</section>
|
|
|
|
<section id="endpoint-panel" class="endpoint-panel hidden">
|
|
<div class="ep-title muted small">OpenAI-compatible endpoint</div>
|
|
<div class="ep-row">
|
|
<span class="ep-label">Base URL</span>
|
|
<code class="ep-value" id="ep-url">—</code>
|
|
<button class="copy-btn" data-copy="#ep-url" title="Copy base URL">Copy</button>
|
|
</div>
|
|
<div class="ep-row">
|
|
<span class="ep-label">Model ID</span>
|
|
<code class="ep-value" id="ep-model">—</code>
|
|
<button class="copy-btn" data-copy="#ep-model" title="Copy model ID">Copy</button>
|
|
</div>
|
|
<details class="ep-curl">
|
|
<summary class="muted small">curl example</summary>
|
|
<pre id="ep-curl-snippet" class="snippet"></pre>
|
|
<button class="copy-btn small" data-copy="#ep-curl-snippet">Copy snippet</button>
|
|
</details>
|
|
</section>
|
|
|
|
<section id="swap-panel" class="swap-panel hidden">
|
|
<div class="swap-header">
|
|
<span class="spinner"></span>
|
|
<span id="swap-title">Swap in progress</span>
|
|
<span class="spacer"></span>
|
|
<span class="timer" id="swap-elapsed">0:00</span>
|
|
</div>
|
|
<div class="phase-row">
|
|
<div class="phase" id="swap-phase">Starting…</div>
|
|
<div class="phase-detail muted small" id="swap-phase-detail"></div>
|
|
</div>
|
|
<div class="phase-track">
|
|
<div class="phase-fill" id="swap-phase-fill"></div>
|
|
</div>
|
|
<details id="swap-log-details">
|
|
<summary class="muted small">Show technical logs</summary>
|
|
<pre id="swap-log" class="log"></pre>
|
|
</details>
|
|
</section>
|
|
|
|
<section id="services-panel" class="services hidden">
|
|
<h2 class="section-title">Always-on services</h2>
|
|
<div id="services-grid" class="services-grid"></div>
|
|
</section>
|
|
|
|
<section id="models-section">
|
|
<h2 class="section-title">LLM swap</h2>
|
|
<section id="cards" class="cards"></section>
|
|
</section>
|
|
|
|
<footer class="footer">
|
|
<div class="health">
|
|
<span class="health-item" id="h-vllm"><span class="dot"></span> vLLM</span>
|
|
<span class="health-item" id="h-parakeet"><span class="dot"></span> Parakeet</span>
|
|
<span class="health-item" id="h-magpie"><span class="dot"></span> Magpie</span>
|
|
</div>
|
|
<div class="muted small" id="updated"></div>
|
|
</footer>
|
|
</main>
|
|
|
|
<script src="/static/app.js"></script>
|
|
</body>
|
|
</html>
|