- Flask backend + static SPA (HTML/CSS/JS) - Docker container discovery via unix socket (stdlib only, no docker SDK) - Host stats (CPU/mem/disk/load/uptime) via psutil - Live-updating UI with per-state filters and resource gauges - Dockerfile for containerized deployment
213 lines
6.5 KiB
CSS
213 lines
6.5 KiB
CSS
:root {
|
|
--bg: #0b1020;
|
|
--bg-soft: #131a2e;
|
|
--card: #161f38;
|
|
--card-hover: #1c2746;
|
|
--border: #24304f;
|
|
--text: #e6ebf5;
|
|
--muted: #8a97b5;
|
|
--accent: #5b8cff;
|
|
--running: #34d399;
|
|
--starting: #fbbf24;
|
|
--paused: #60a5fa;
|
|
--stopped: #64748b;
|
|
--dead: #f87171;
|
|
--danger: #f87171;
|
|
--radius: 14px;
|
|
--shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
background: radial-gradient(1200px 600px at 80% -10%, #17223f 0%, var(--bg) 55%);
|
|
color: var(--text);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* Top bar */
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 22px;
|
|
background: linear-gradient(180deg, rgba(20, 28, 52, 0.9), rgba(15, 20, 38, 0.75));
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
backdrop-filter: blur(8px);
|
|
z-index: 10;
|
|
}
|
|
|
|
.brand { display: flex; align-items: baseline; gap: 10px; }
|
|
.brand-icon { font-size: 22px; }
|
|
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0.3px; }
|
|
.brand-sub { color: var(--muted); font-size: 13px; }
|
|
|
|
.topbar-status { display: flex; align-items: center; gap: 12px; }
|
|
.badge {
|
|
font-size: 12px;
|
|
padding: 4px 10px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--border);
|
|
background: var(--bg-soft);
|
|
}
|
|
.badge-idle { color: var(--muted); }
|
|
.badge-ok { color: var(--running); border-color: rgba(52, 211, 153, 0.4); }
|
|
.btn {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border: none;
|
|
padding: 7px 14px;
|
|
border-radius: 10px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: transform 0.08s ease, background 0.15s ease;
|
|
}
|
|
.btn:hover { background: #6f99ff; }
|
|
.btn:active { transform: scale(0.96); }
|
|
.muted { color: var(--muted); font-size: 12px; }
|
|
|
|
/* Main */
|
|
main { padding: 20px 22px 40px; max-width: 1280px; margin: 0 auto; }
|
|
|
|
/* Host cards */
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 14px;
|
|
margin-bottom: 18px;
|
|
}
|
|
.card {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px 18px;
|
|
box-shadow: var(--shadow);
|
|
transition: transform 0.12s ease, background 0.15s ease;
|
|
}
|
|
.card:hover { background: var(--card-hover); transform: translateY(-2px); }
|
|
.card-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
|
|
.card-value { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 6px; }
|
|
.card-value .num { font-size: 30px; font-weight: 700; }
|
|
.card-value .pct { font-size: 18px; color: var(--muted); }
|
|
.card-detail { color: var(--muted); font-size: 12px; }
|
|
|
|
/* Summary pills */
|
|
.summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
|
|
.pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 14px;
|
|
border-radius: 999px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: all 0.15s ease;
|
|
}
|
|
.pill:hover { background: var(--card-hover); }
|
|
.pill.active { outline: 2px solid var(--accent); background: var(--card-hover); }
|
|
.pill-count {
|
|
background: var(--bg-soft);
|
|
border-radius: 999px;
|
|
padding: 1px 8px;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
}
|
|
.pill-running.active { border-color: var(--running); }
|
|
.pill-starting.active { border-color: var(--starting); }
|
|
.pill-paused.active { border-color: var(--paused); }
|
|
.pill-stopped.active { border-color: var(--stopped); }
|
|
.pill-dead.active { border-color: var(--dead); }
|
|
|
|
/* Container grid */
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 14px;
|
|
}
|
|
.empty {
|
|
grid-column: 1 / -1;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
padding: 50px 0;
|
|
border: 1px dashed var(--border);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.cell {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
transition: transform 0.12s ease, background 0.15s ease;
|
|
}
|
|
.cell:hover { background: var(--card-hover); transform: translateY(-2px); }
|
|
.cell-head { display: flex; align-items: center; gap: 10px; }
|
|
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 8px currentColor; }
|
|
.dot.running { color: var(--running); background: var(--running); }
|
|
.dot.starting { color: var(--starting); background: var(--starting); }
|
|
.dot.paused { color: var(--paused); background: var(--paused); }
|
|
.dot.stopped { color: var(--stopped); background: var(--stopped); }
|
|
.dot.dead { color: var(--dead); background: var(--dead); }
|
|
.cell-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.cell-status {
|
|
margin-left: auto;
|
|
font-size: 11px;
|
|
padding: 3px 8px;
|
|
border-radius: 6px;
|
|
text-transform: capitalize;
|
|
white-space: nowrap;
|
|
}
|
|
.cell-status.running { background: rgba(52, 211, 153, 0.15); color: var(--running); }
|
|
.cell-status.starting { background: rgba(251, 191, 36, 0.15); color: var(--starting); }
|
|
.cell-status.paused { background: rgba(96, 165, 250, 0.15); color: var(--paused); }
|
|
.cell-status.stopped { background: rgba(100, 116, 139, 0.15); color: var(--stopped); }
|
|
.cell-status.dead { background: rgba(248, 113, 113, 0.15); color: var(--dead); }
|
|
|
|
.cell-image { color: var(--muted); font-size: 12px; word-break: break-all; }
|
|
|
|
.bars { display: flex; flex-direction: column; gap: 6px; }
|
|
.bar-row { display: grid; grid-template-columns: 42px 1fr 46px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
|
|
.bar-track { background: var(--bg-soft); border-radius: 6px; height: 7px; overflow: hidden; }
|
|
.bar-fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; }
|
|
.bar-fill.low { background: var(--running); }
|
|
.bar-fill.mid { background: var(--starting); }
|
|
.bar-fill.high { background: var(--dead); }
|
|
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
|
|
|
|
.cell-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
|
|
.tag {
|
|
font-size: 10.5px;
|
|
padding: 2px 7px;
|
|
border-radius: 6px;
|
|
background: var(--bg-soft);
|
|
border: 1px solid var(--border);
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
}
|
|
.tag.port { color: var(--paused); }
|
|
.tag.health-ok { color: var(--running); border-color: rgba(52, 211, 153, 0.3); }
|
|
|
|
.footer {
|
|
margin-top: 26px;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.brand-sub { display: none; }
|
|
.cards { grid-template-columns: repeat(2, 1fr); }
|
|
}
|