Files
cosma-qc/app/static/style.css
Flag 960ebc0393 dashboard — preview thumbnail par job
dispatcher scp frame_*.jpg (premiere apres trim head) vers
/var/lib/cosma-qc/thumbnails/job_N.jpg a la fin de do_extract.

Endpoint GET /jobs/{id}/thumbnail serve via FileResponse. Template:
<img class=thumb src=jobs/N/thumbnail> si has_thumbnail. 48x27 px,
object-fit cover.

Backfill manuel des jobs deja done (9, 12, 13, 16, 19) via scp direct.
2026-04-22 22:06:43 +00:00

132 lines
6.8 KiB
CSS

:root {
--bg: #0b1220;
--panel: #121a2b;
--border: #1f2a44;
--text: #e6edf7;
--muted: #7b8aa8;
--accent: #5fd0ff;
--ok: #3ddc84;
--warn: #f5c518;
--err: #ff5c7a;
}
* { box-sizing: border-box; }
body {
font-family: ui-monospace, "JetBrains Mono", Menlo, monospace;
background: var(--bg); color: var(--text);
margin: 0; padding: 1.5rem;
}
header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
header h1 { margin: 0; font-size: 1.25rem; color: var(--accent); }
.sub { color: var(--muted); font-size: 0.85rem; }
h2 { font-size: 1rem; color: var(--accent); margin: 1.5rem 0 0.5rem; }
.muted { color: var(--muted); }
.err { color: var(--err); }
section { background: var(--panel); border: 1px solid var(--border);
border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.worker-grid { display: grid; gap: 1rem;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.worker { background: rgba(255,255,255,0.02); border: 1px solid var(--border);
border-radius: 8px; padding: 0.75rem; }
.worker.offline { opacity: 0.55; border-color: var(--err); }
.worker .hdr { display: flex; justify-content: space-between;
gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.worker .gpu { color: var(--muted); font-size: 0.8rem; }
.worker .state { color: var(--ok); font-size: 0.75rem; text-transform: uppercase; }
.worker.offline .state { color: var(--err); }
.bar { display: grid; grid-template-columns: 60px 1fr auto; gap: 0.5rem;
align-items: center; margin-bottom: 0.25rem; font-size: 0.8rem; }
.bar small { color: var(--muted); }
progress { appearance: none; height: 10px; width: 100%;
border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: #0a1020; }
progress::-webkit-progress-bar { background: #0a1020; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.acq-grid { display: grid; gap: 1rem;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.acq-col { background: rgba(255,255,255,0.02); border: 1px solid var(--border);
border-radius: 8px; padding: 0.75rem; }
.acq-title { color: var(--text); font-size: 0.95rem; margin: 0 0 0.75rem;
padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
display: flex; justify-content: space-between; align-items: baseline; }
.acq-title .total { color: var(--muted); font-size: 0.8rem; font-weight: normal; }
.job-list { list-style: none; margin: 0; padding: 0; }
.job-list .job-item { display: grid;
grid-template-columns: 20px 1fr auto 20px; gap: 0.5rem;
align-items: center; padding: 0.25rem 0; font-size: 0.85rem; }
.job-list .job-item .icon { display: inline-flex; align-items: center; justify-content: center;
width: 18px; height: 18px; border-radius: 3px; }
.job-list .job-item.done .icon { background: var(--ok); color: #062410; font-weight: bold; }
.job-list .job-item.running .icon,
.job-list .job-item.extracting .icon { color: var(--accent); }
.job-list .job-item.running .icon .spin,
.job-list .job-item.extracting .icon .spin { display: inline-block;
animation: spin 1.2s linear infinite; }
.job-list .job-item.queued .icon { color: var(--muted); }
.job-list .job-item.error .icon { background: var(--err); color: #fff; font-weight: bold; }
.job-list .label { color: var(--text); overflow: hidden; text-overflow: ellipsis;
white-space: nowrap; display: flex; flex-direction: column; gap: 2px; }
.prog-wrap { display: flex; align-items: center; gap: 4px; height: 10px; position: relative; width: 100%; max-width: 160px; }
.prog-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s; min-width: 2px; }
.prog-text { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.job-list .dur { color: var(--muted); font-size: 0.78rem; }
.job-list .ext { margin-left: 0.5rem; color: var(--accent); font-size: 0.75rem; }
button.ext.viewer-btn { background: transparent; border: 1px solid var(--accent);
color: var(--accent); font-size: 0.72rem; padding: 1px 6px; border-radius: 3px;
cursor: pointer; font-family: inherit; }
button.ext.viewer-btn:hover { background: var(--accent); color: #000; }
button.ext.viewer-btn:disabled { opacity: 0.6; cursor: wait; }
.err-line { color: var(--err); font-size: 0.75rem;
padding-left: 28px; padding-bottom: 0.25rem; }
.stitch-section { margin-top: 0.75rem; padding-top: 0.6rem;
border-top: 1px dashed var(--border); }
.stitch-title { display: flex; align-items: center; gap: 0.5rem;
color: var(--text); font-size: 0.85rem; margin-bottom: 0.25rem; }
.stitch-children { list-style: none; padding: 0 0 0 1.4rem; margin: 0; }
.stitch-children .sub { color: var(--muted); font-size: 0.8rem;
padding: 0.15rem 0; display: flex; align-items: center; gap: 0.4rem; }
button.mini { padding: 0 0.4rem; font-size: 0.75rem; line-height: 1.4; }
@keyframes spin { to { transform: rotate(360deg); } }
.monitor-header { margin-bottom: 0.75rem; }
.dispatcher-status { display: inline-flex; align-items: center; gap: 0.4rem;
font-size: 0.8rem; color: var(--muted); }
.dispatcher-status .dot { width: 8px; height: 8px; border-radius: 50%;
background: var(--err); flex-shrink: 0; }
.dispatcher-status.alive .dot { background: var(--ok); }
.dispatcher-status.alive { color: var(--ok); }
.worker-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.tag { font-size: 0.75rem; padding: 0.1rem 0.35rem; border-radius: 4px;
background: rgba(255,255,255,0.05); color: var(--text); }
.tag.warn { color: var(--warn); }
button { background: transparent; color: var(--accent); border: 1px solid var(--border);
padding: 0.2rem 0.6rem; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 0.75rem; }
button:hover { border-color: var(--accent); }
a { color: var(--accent); }
code { background: rgba(255,255,255,0.05); padding: 0 0.25rem; border-radius: 3px; }
/* Job row columns: id · AUV-GP · segment · meta · progress · viser */
.job-item .label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.job-item .job-id { font-family: monospace; color: var(--mut, #666); font-size: 12px; min-width: 32px; }
.job-item .auv-gp { font-weight: 600; min-width: 100px; }
.job-item .seg { color: var(--mut, #666); font-variant-numeric: tabular-nums; min-width: 90px; }
.job-item .meta { color: var(--mut, #888); font-size: 12px; font-variant-numeric: tabular-nums; }
.job-item .meta::before { content: '· '; opacity: 0.5; }
.job-item .viser-link { text-decoration: none; padding: 2px 8px; border: 1px solid var(--accent, #4a9); border-radius: 3px; color: var(--accent, #4a9); font-size: 12px; }
.job-item .viser-link:hover { background: var(--accent, #4a9); color: white; }
.job-item.skipped { opacity: 0.55; }
.job-item.skipped .label { font-style: italic; }
.job-item .thumb { width: 48px; height: 27px; object-fit: cover; border-radius: 3px; margin-right: 4px; }