v0.2.4 - Hotfix: Unknown status + copy UX + update banner context
Bug fix: - config.py: empty PARAKEET_CONTAINER / MAGPIE_CONTAINER env vars (from migrating to v0.2.0+ where the field is optional and saved as '') now fall back to 'parakeet-asr' / 'magpie-tts' via the 'or' idiom. Confirmed live: services classify as 'running' instead of 'unknown'. UX: - Replaced text 'Copy' buttons with compact icon buttons (clipboard SVG) - Endpoint Base URL + Model ID + curl snippet are now click-to-copy themselves (the value AND a separate icon button) - Service cards: host, base URL, and model are now three separate copyable rows - Update banner: leading explanatory line — 'Updates to eugr/spark-vllm-docker — the upstream project that orchestrates vLLM on your Sparks. These are not firmware, OS, or model updates.' with a link to the repo.
This commit is contained in:
+2
-2
@@ -55,10 +55,10 @@ class Settings:
|
|||||||
spark2_user=spark2_user,
|
spark2_user=spark2_user,
|
||||||
parakeet_host=_env("PARAKEET_HOST") or spark2_host,
|
parakeet_host=_env("PARAKEET_HOST") or spark2_host,
|
||||||
parakeet_user=_env("PARAKEET_USER") or spark2_user,
|
parakeet_user=_env("PARAKEET_USER") or spark2_user,
|
||||||
parakeet_container=_env("PARAKEET_CONTAINER", "parakeet-asr"),
|
parakeet_container=_env("PARAKEET_CONTAINER") or "parakeet-asr",
|
||||||
magpie_host=_env("MAGPIE_HOST") or spark2_host,
|
magpie_host=_env("MAGPIE_HOST") or spark2_host,
|
||||||
magpie_user=_env("MAGPIE_USER") or spark2_user,
|
magpie_user=_env("MAGPIE_USER") or spark2_user,
|
||||||
magpie_container=_env("MAGPIE_CONTAINER", "magpie-tts"),
|
magpie_container=_env("MAGPIE_CONTAINER") or "magpie-tts",
|
||||||
ssh_key_path=_env("SSH_KEY_PATH"),
|
ssh_key_path=_env("SSH_KEY_PATH"),
|
||||||
ssh_known_hosts=_env("SSH_KNOWN_HOSTS"),
|
ssh_known_hosts=_env("SSH_KNOWN_HOSTS"),
|
||||||
models_yaml=_resolve_models_yaml(),
|
models_yaml=_resolve_models_yaml(),
|
||||||
|
|||||||
+48
-23
@@ -143,11 +143,16 @@ async function renderServices() {
|
|||||||
if (action === 'stop' && cls !== 'running' && cls !== 'starting' && cls !== 'unhealthy') return true;
|
if (action === 'stop' && cls !== 'running' && cls !== 'starting' && cls !== 'unhealthy') return true;
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
const copyIcon = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>`;
|
||||||
|
const hostStr = s.host ? `${s.host}:${s.port}` : '';
|
||||||
const hostRow = s.host
|
const hostRow = s.host
|
||||||
? `<div class="row"><span class="k">Host</span><span class="v">${escapeHtml(s.host)}:${s.port}</span></div>`
|
? `<div class="row"><span class="k">Host</span><span class="v copyable" data-copy-self title="Click to copy">${escapeHtml(hostStr)}</span><button class="icon-btn" data-copy-text="${escapeHtml(hostStr)}" title="Copy host" aria-label="Copy">${copyIcon}</button></div>`
|
||||||
: `<div class="row"><span class="k">Host</span><span class="v muted-v">not configured</span></div>`;
|
: `<div class="row"><span class="k">Host</span><span class="v muted-v">not configured</span></div>`;
|
||||||
|
const urlRow = s.base_url
|
||||||
|
? `<div class="row"><span class="k">URL</span><span class="v copyable" data-copy-self title="Click to copy">${escapeHtml(s.base_url)}</span><button class="icon-btn" data-copy-text="${escapeHtml(s.base_url)}" title="Copy URL" aria-label="Copy">${copyIcon}</button></div>`
|
||||||
|
: '';
|
||||||
const modelRow = s.model
|
const modelRow = s.model
|
||||||
? `<div class="row"><span class="k">Model</span><span class="v">${escapeHtml(s.model)}</span></div>`
|
? `<div class="row"><span class="k">Model</span><span class="v copyable" data-copy-self title="Click to copy">${escapeHtml(s.model)}</span><button class="icon-btn" data-copy-text="${escapeHtml(s.model)}" title="Copy model" aria-label="Copy">${copyIcon}</button></div>`
|
||||||
: '';
|
: '';
|
||||||
const restartsRow = s.restart_count != null && s.restart_count > 1
|
const restartsRow = s.restart_count != null && s.restart_count > 1
|
||||||
? `<div class="row"><span class="k">Restarts</span><span class="v">${s.restart_count}</span></div>`
|
? `<div class="row"><span class="k">Restarts</span><span class="v">${s.restart_count}</span></div>`
|
||||||
@@ -159,6 +164,7 @@ async function renderServices() {
|
|||||||
<span class="status">${statusLabel(cls)}</span>
|
<span class="status">${statusLabel(cls)}</span>
|
||||||
</div>
|
</div>
|
||||||
${hostRow}
|
${hostRow}
|
||||||
|
${urlRow}
|
||||||
${modelRow}
|
${modelRow}
|
||||||
${restartsRow}
|
${restartsRow}
|
||||||
<div class="service-actions">
|
<div class="service-actions">
|
||||||
@@ -212,31 +218,50 @@ function renderEndpoint(status) {
|
|||||||
el('#ep-curl-snippet').textContent = snippet;
|
el('#ep-curl-snippet').textContent = snippet;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupCopyButtons() {
|
async function copyText(text, indicatorEl) {
|
||||||
document.body.addEventListener('click', async (e) => {
|
try {
|
||||||
const btn = e.target.closest('.copy-btn');
|
await navigator.clipboard.writeText(text);
|
||||||
if (!btn) return;
|
if (indicatorEl) {
|
||||||
const targetSel = btn.dataset.copy;
|
indicatorEl.classList.add('copied');
|
||||||
if (!targetSel) return;
|
setTimeout(() => indicatorEl.classList.remove('copied'), 1200);
|
||||||
const target = el(targetSel);
|
}
|
||||||
if (!target) return;
|
return true;
|
||||||
const text = target.textContent;
|
} catch {
|
||||||
try {
|
// Plain HTTP fallback: select the text so the user can ⌘C
|
||||||
await navigator.clipboard.writeText(text);
|
if (indicatorEl) {
|
||||||
const original = btn.textContent;
|
|
||||||
btn.classList.add('copied');
|
|
||||||
btn.textContent = 'Copied';
|
|
||||||
setTimeout(() => {
|
|
||||||
btn.classList.remove('copied');
|
|
||||||
btn.textContent = original;
|
|
||||||
}, 1400);
|
|
||||||
} catch {
|
|
||||||
// Clipboard API may fail over plain HTTP; fall back to selection
|
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
range.selectNode(target);
|
range.selectNode(indicatorEl);
|
||||||
window.getSelection().removeAllRanges();
|
window.getSelection().removeAllRanges();
|
||||||
window.getSelection().addRange(range);
|
window.getSelection().addRange(range);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupCopyButtons() {
|
||||||
|
document.body.addEventListener('click', async (e) => {
|
||||||
|
// Inline icon copy with literal text (used for dynamically-rendered service rows)
|
||||||
|
const litBtn = e.target.closest('[data-copy-text]');
|
||||||
|
if (litBtn) {
|
||||||
|
await copyText(litBtn.dataset.copyText, litBtn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Copy buttons (with svg icon) referenced by data-copy="selector"
|
||||||
|
const btn = e.target.closest('[data-copy]');
|
||||||
|
if (btn) {
|
||||||
|
const target = el(btn.dataset.copy);
|
||||||
|
if (target) {
|
||||||
|
await copyText(target.textContent, btn);
|
||||||
|
target.classList.add('copied');
|
||||||
|
setTimeout(() => target.classList.remove('copied'), 1200);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Self-copy: clicking the text itself
|
||||||
|
const selfCopy = e.target.closest('[data-copy-self]');
|
||||||
|
if (selfCopy) {
|
||||||
|
await copyText(selfCopy.textContent, selfCopy);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,18 +28,24 @@
|
|||||||
<div class="ep-title muted small">OpenAI-compatible endpoint</div>
|
<div class="ep-title muted small">OpenAI-compatible endpoint</div>
|
||||||
<div class="ep-row">
|
<div class="ep-row">
|
||||||
<span class="ep-label">Base URL</span>
|
<span class="ep-label">Base URL</span>
|
||||||
<code class="ep-value" id="ep-url">—</code>
|
<code class="ep-value copyable" id="ep-url" data-copy-self title="Click to copy">—</code>
|
||||||
<button class="copy-btn" data-copy="#ep-url" title="Copy base URL">Copy</button>
|
<button class="icon-btn" data-copy="#ep-url" title="Copy base URL" aria-label="Copy">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ep-row">
|
<div class="ep-row">
|
||||||
<span class="ep-label">Model ID</span>
|
<span class="ep-label">Model ID</span>
|
||||||
<code class="ep-value" id="ep-model">—</code>
|
<code class="ep-value copyable" id="ep-model" data-copy-self title="Click to copy">—</code>
|
||||||
<button class="copy-btn" data-copy="#ep-model" title="Copy model ID">Copy</button>
|
<button class="icon-btn" data-copy="#ep-model" title="Copy model ID" aria-label="Copy">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<details class="ep-curl">
|
<details class="ep-curl">
|
||||||
<summary class="muted small">curl example</summary>
|
<summary class="muted small">curl example</summary>
|
||||||
<pre id="ep-curl-snippet" class="snippet"></pre>
|
<pre id="ep-curl-snippet" class="snippet copyable" data-copy-self title="Click to copy"></pre>
|
||||||
<button class="copy-btn small" data-copy="#ep-curl-snippet">Copy snippet</button>
|
<button class="icon-btn" data-copy="#ep-curl-snippet" title="Copy snippet" aria-label="Copy">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||||
|
</button>
|
||||||
</details>
|
</details>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -165,6 +171,10 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="update-banner" class="update-banner hidden">
|
<section id="update-banner" class="update-banner hidden">
|
||||||
|
<div class="ub-context muted small">
|
||||||
|
Updates to <strong><a href="https://github.com/eugr/spark-vllm-docker" target="_blank" rel="noopener">eugr/spark-vllm-docker</a></strong>
|
||||||
|
— the upstream project that orchestrates vLLM on your Sparks (launch-cluster.sh, recipes, mods). These are <em>not</em> firmware, OS, or model updates.
|
||||||
|
</div>
|
||||||
<div class="ub-row">
|
<div class="ub-row">
|
||||||
<span id="ub-text">Checking for updates…</span>
|
<span id="ub-text">Checking for updates…</span>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ main {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.copy-btn {
|
.copy-btn,
|
||||||
|
.icon-btn {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background: var(--surface-2);
|
background: var(--surface-2);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -108,15 +109,27 @@ main {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.copy-btn:hover { color: var(--text); border-color: #34343c; }
|
.icon-btn { padding: 5px 7px; }
|
||||||
.copy-btn.copied {
|
.icon-btn svg { width: 14px; height: 14px; display: block; }
|
||||||
|
.copy-btn:hover,
|
||||||
|
.icon-btn:hover { color: var(--text); border-color: #34343c; }
|
||||||
|
.copy-btn.copied,
|
||||||
|
.icon-btn.copied {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
border-color: rgba(74, 222, 128, 0.4);
|
border-color: rgba(74, 222, 128, 0.4);
|
||||||
background: rgba(74, 222, 128, 0.08);
|
background: rgba(74, 222, 128, 0.08);
|
||||||
}
|
}
|
||||||
|
.icon-btn.copied svg { color: var(--accent); }
|
||||||
.copy-btn.small { padding: 3px 8px; font-size: 11px; }
|
.copy-btn.small { padding: 3px 8px; font-size: 11px; }
|
||||||
|
|
||||||
|
.copyable { cursor: pointer; }
|
||||||
|
.copyable:hover { outline: 1px solid rgba(96, 165, 250, 0.5); }
|
||||||
|
.copyable.copied { outline: 1px solid var(--accent); background: rgba(74, 222, 128, 0.05); }
|
||||||
|
|
||||||
.ep-curl { margin-top: 8px; }
|
.ep-curl { margin-top: 8px; }
|
||||||
.ep-curl summary { cursor: pointer; padding: 4px 0; }
|
.ep-curl summary { cursor: pointer; padding: 4px 0; }
|
||||||
.ep-curl[open] summary { margin-bottom: 6px; }
|
.ep-curl[open] summary { margin-bottom: 6px; }
|
||||||
@@ -274,10 +287,14 @@ main {
|
|||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
border: 1px solid rgba(96, 165, 250, 0.4);
|
border: 1px solid rgba(96, 165, 250, 0.4);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
padding: 10px 14px;
|
padding: 12px 14px;
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
.ub-context { margin-bottom: 8px; line-height: 1.5; }
|
||||||
|
.ub-context a { color: var(--info); text-decoration: none; }
|
||||||
|
.ub-context a:hover { text-decoration: underline; }
|
||||||
|
.ub-context em { font-style: normal; color: var(--text); font-weight: 500; }
|
||||||
.update-banner.up-to-date {
|
.update-banner.up-to-date {
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
@@ -409,13 +426,25 @@ main {
|
|||||||
|
|
||||||
.service-card .row {
|
.service-card .row {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
.service-card .row .k { width: 60px; flex-shrink: 0; }
|
.service-card .row .k { width: 60px; flex-shrink: 0; }
|
||||||
.service-card .row .v { color: var(--text); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; word-break: break-all; }
|
.service-card .row .v {
|
||||||
|
color: var(--text);
|
||||||
|
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
|
||||||
|
word-break: break-all;
|
||||||
|
flex: 1;
|
||||||
|
padding: 2px 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
.service-card .row .v.muted-v { color: var(--muted); font-family: inherit; }
|
.service-card .row .v.muted-v { color: var(--muted); font-family: inherit; }
|
||||||
|
.service-card .row .v.copyable:hover { outline: 1px solid rgba(96, 165, 250, 0.5); }
|
||||||
|
.service-card .row .v.copyable.copied { outline: 1px solid var(--accent); background: rgba(74, 222, 128, 0.05); }
|
||||||
|
.service-card .row .icon-btn { padding: 3px 6px; }
|
||||||
|
.service-card .row .icon-btn svg { width: 12px; height: 12px; }
|
||||||
|
|
||||||
.service-actions {
|
.service-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { VersionInfo, IMPOSSIBLE } from '@start9labs/start-sdk'
|
import { VersionInfo, IMPOSSIBLE } from '@start9labs/start-sdk'
|
||||||
|
|
||||||
export const v0_1_0 = VersionInfo.of({
|
export const v0_1_0 = VersionInfo.of({
|
||||||
version: '0.2.3:0',
|
version: '0.2.4:0',
|
||||||
releaseNotes: {
|
releaseNotes: {
|
||||||
en_US:
|
en_US:
|
||||||
'Per-model Advanced settings + downloaded-model catalog flow. Each card now has an Advanced button: max context tokens, GPU memory %, and optimization toggles (fastsafetensors, prefix caching, FP8 KV cache). After a download finishes, a dialog appears to add the model to the catalog with those same knobs as launch defaults. Custom models can be deleted. Overrides persist in /data/models-overrides.yaml and survive package updates.',
|
'Hotfix + UX polish: fixes parakeet/magpie status showing as "Unknown" (empty container-name env var no longer overrode the default). Copy buttons are now compact icons, and the values themselves are clickable to copy. Service cards show host + URL + model as separate copyable rows. The update banner now spells out what is being updated (spark-vllm-docker, the upstream LLM-cluster project).',
|
||||||
},
|
},
|
||||||
migrations: {
|
migrations: {
|
||||||
up: async ({ effects }) => {},
|
up: async ({ effects }) => {},
|
||||||
|
|||||||
Reference in New Issue
Block a user