v0.2.0 - Always-on services panel with per-service host config
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
This commit is contained in:
@@ -217,6 +217,79 @@ main {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* ===== Section titles ===== */
|
||||
|
||||
.section-title {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
margin: 24px 0 12px;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.section-title:first-child { margin-top: 0; }
|
||||
|
||||
/* ===== Services panel ===== */
|
||||
|
||||
.services-grid {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
}
|
||||
|
||||
.service-card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 14px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.service-card.running { border-color: rgba(74, 222, 128, 0.45); }
|
||||
.service-card.unhealthy { border-color: rgba(239, 68, 68, 0.55); }
|
||||
.service-card.missing,
|
||||
.service-card.unconfigured { border-color: rgba(245, 158, 11, 0.45); }
|
||||
.service-card .head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.service-card .head .name { font-weight: 600; font-size: 15px; }
|
||||
.service-card .head .kind { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
|
||||
.service-card .head .status {
|
||||
margin-left: auto;
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
}
|
||||
.service-card.running .status { color: var(--accent); border-color: rgba(74, 222, 128, 0.4); }
|
||||
.service-card.unhealthy .status { color: var(--error); border-color: rgba(239, 68, 68, 0.4); }
|
||||
.service-card.missing .status,
|
||||
.service-card.unconfigured .status { color: var(--warn); border-color: rgba(245, 158, 11, 0.4); }
|
||||
|
||||
.service-card .row {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
gap: 6px;
|
||||
}
|
||||
.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.muted-v { color: var(--muted); font-family: inherit; }
|
||||
|
||||
.service-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.service-actions .btn { padding: 6px 12px; font-size: 12px; flex: 1; }
|
||||
.service-actions .btn.danger { color: var(--error); border-color: rgba(239, 68, 68, 0.3); }
|
||||
.service-actions .btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.08); border-color: var(--error); }
|
||||
|
||||
/* ===== Cards ===== */
|
||||
|
||||
.cards {
|
||||
|
||||
Reference in New Issue
Block a user