dashboard: add dense stat cards, cluster bars, job rows, sparkline fixes
This commit is contained in:
parent
e5e0656a6a
commit
5de1e3dc3d
1 changed files with 266 additions and 52 deletions
|
|
@ -109,77 +109,82 @@
|
|||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
/* ========== Home dashboard ========== */
|
||||
.home-hero {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 16px;
|
||||
padding: 20px 28px;
|
||||
}
|
||||
.home-greeting {
|
||||
padding: 24px 28px 0;
|
||||
}
|
||||
.home-greeting h1 {
|
||||
margin: 0 0 4px;
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
.home-greeting p { margin: 0; color: var(--text-3); font-size: 13px; }
|
||||
|
||||
.stat-row {
|
||||
/* ========== Dashboard stats — dense row, not hero-metric cards ========== */
|
||||
.dash-stat-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 12px;
|
||||
gap: 10px;
|
||||
padding: 12px 28px;
|
||||
}
|
||||
.stat-card {
|
||||
@media (max-width: 1100px) {
|
||||
.dash-stat-row { grid-template-columns: repeat(2, 1fr); }
|
||||
}
|
||||
|
||||
.dash-stat {
|
||||
background: var(--bg-1);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--r-lg);
|
||||
padding: 14px 16px;
|
||||
border-radius: var(--r-md);
|
||||
padding: 10px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
gap: 2px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: border-color 80ms;
|
||||
}
|
||||
.stat-card .label {
|
||||
font-size: 11.5px;
|
||||
color: var(--text-3);
|
||||
.dash-stat:hover { border-color: var(--border-stronger); }
|
||||
|
||||
.dash-stat-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dash-stat-label {
|
||||
font-size: 10.5px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
font-weight: 600;
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
color: var(--text-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.stat-card .value {
|
||||
font-size: 26px;
|
||||
.dash-stat-ico {
|
||||
color: var(--text-4);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.dash-stat-mono {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 1.2;
|
||||
color: var(--text-1);
|
||||
}
|
||||
.stat-card .delta {
|
||||
font-size: 11.5px;
|
||||
.dash-stat-mono-sub {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
color: var(--text-3);
|
||||
}
|
||||
.dash-stat-sub {
|
||||
font-size: 11px;
|
||||
color: var(--text-3);
|
||||
font-family: var(--font-mono);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.stat-card .delta.up { color: var(--success); }
|
||||
.stat-card .spark {
|
||||
position: absolute;
|
||||
right: 0; bottom: 0;
|
||||
width: 60%; height: 36px;
|
||||
opacity: 0.7;
|
||||
.dash-stat-sub.up { color: var(--success); }
|
||||
|
||||
/* Sparkline sits in its own row at the bottom — no absolute positioning */
|
||||
.dash-sparkline {
|
||||
height: 24px;
|
||||
margin-top: 4px;
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ========== Live feed tiles ========== */
|
||||
.home-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
|
|
@ -222,6 +227,15 @@
|
|||
text-overflow: ellipsis;
|
||||
min-width: 0;
|
||||
}
|
||||
.live-feed-tile-label .source {
|
||||
color: rgba(255,255,255,0.7);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 10px;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.live-feed-tile-label .time {
|
||||
margin-left: auto;
|
||||
color: white;
|
||||
|
|
@ -237,6 +251,28 @@
|
|||
top: 8px; left: 8px;
|
||||
z-index: 2;
|
||||
}
|
||||
.live-feed-tile-project {
|
||||
position: absolute;
|
||||
top: 8px; right: 8px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
color: rgba(255,255,255,0.8);
|
||||
font-size: 10.5px;
|
||||
font-family: var(--font-mono);
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.live-feed-project-dot {
|
||||
width: 6px; height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ========== Activity feed ========== */
|
||||
.activity-feed {
|
||||
background: var(--bg-1);
|
||||
border: 1px solid var(--border);
|
||||
|
|
@ -245,7 +281,7 @@
|
|||
}
|
||||
.activity-row {
|
||||
display: flex; align-items: flex-start; gap: 10px;
|
||||
padding: 12px 14px;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
|
@ -257,23 +293,201 @@
|
|||
flex-shrink: 0;
|
||||
color: var(--text-2);
|
||||
}
|
||||
.activity-icon.comment { background: var(--accent-soft); color: var(--accent-text); }
|
||||
.activity-icon.record { background: var(--live-soft); color: var(--live); }
|
||||
.activity-icon.job { background: var(--purple-soft); color: var(--purple); }
|
||||
.activity-icon.upload { background: var(--bg-3); color: var(--text-2); }
|
||||
.activity-icon.sync { background: var(--success-soft); color: var(--success); }
|
||||
.activity-icon.approve { background: var(--success-soft); color: var(--success); }
|
||||
.activity-icon.error { background: var(--danger-soft); color: var(--danger); }
|
||||
.activity-text { flex: 1; line-height: 1.4; }
|
||||
.activity-text { flex: 1; line-height: 1.4; min-width: 0; }
|
||||
.activity-text strong { color: var(--text-1); font-weight: 500; }
|
||||
.activity-text .target { color: var(--accent-text); }
|
||||
.activity-meta {
|
||||
display: flex; gap: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.activity-dur {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
color: var(--text-3);
|
||||
background: var(--bg-2);
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.activity-res {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
color: var(--text-3);
|
||||
background: var(--bg-2);
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.activity-time { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); white-space: nowrap; }
|
||||
|
||||
/* ========== Mini job rows ========== */
|
||||
.mini-job-row {
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.mini-job-row:last-child { border-bottom: 0; }
|
||||
.mini-job-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
}
|
||||
.mini-job-line1 {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.mini-job-kind { color: var(--text-2); flex-shrink: 0; }
|
||||
.mini-job-sep { color: var(--text-4); flex-shrink: 0; }
|
||||
.mini-job-asset {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
.mini-job-node {
|
||||
color: var(--text-4);
|
||||
font-size: 10.5px;
|
||||
font-family: var(--font-mono);
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
.mini-job-progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 18px;
|
||||
}
|
||||
.mini-job-progress::before {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 3px;
|
||||
background: var(--bg-3);
|
||||
border-radius: 99px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
.mini-job-progress-fill {
|
||||
height: 3px;
|
||||
background: var(--accent);
|
||||
border-radius: 99px;
|
||||
transition: width 300ms;
|
||||
display: block;
|
||||
flex: 1;
|
||||
}
|
||||
.mini-job-progress-fill { display: none; }
|
||||
.mini-job-progress {
|
||||
position: relative;
|
||||
height: 14px;
|
||||
}
|
||||
.mini-job-progress .mini-job-progress-fill {
|
||||
position: absolute;
|
||||
left: 0; top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 3px;
|
||||
background: var(--accent);
|
||||
border-radius: 99px;
|
||||
display: block;
|
||||
}
|
||||
.mini-job-pct {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 10px;
|
||||
color: var(--text-3);
|
||||
flex-shrink: 0;
|
||||
min-width: 28px;
|
||||
text-align: right;
|
||||
}
|
||||
.mini-job-error {
|
||||
font-size: 11px;
|
||||
color: var(--danger);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mini-job-right {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 10.5px;
|
||||
color: var(--text-3);
|
||||
min-width: 40px;
|
||||
text-align: right;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ========== Cluster node rows ========== */
|
||||
.cluster-node-row {
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-size: 12.5px;
|
||||
}
|
||||
.cluster-node-row:last-child { border-bottom: 0; }
|
||||
.cluster-node-name {
|
||||
font-weight: 500;
|
||||
font-size: 12.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cluster-node-spacer { flex: 1; min-width: 8px; }
|
||||
.cluster-node-metric {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.cluster-node-metric-label {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 9.5px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-4);
|
||||
width: 22px;
|
||||
}
|
||||
.cluster-node-bar {
|
||||
width: 48px;
|
||||
height: 3px;
|
||||
background: var(--bg-3);
|
||||
border-radius: 99px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
.cluster-node-bar-fill {
|
||||
height: 100%;
|
||||
border-radius: 99px;
|
||||
display: block;
|
||||
transition: width 200ms;
|
||||
}
|
||||
.cluster-node-metric-val {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 10.5px;
|
||||
color: var(--text-3);
|
||||
min-width: 30px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ========== Empty states ========== */
|
||||
.dash-empty {
|
||||
padding: 16px 0;
|
||||
color: var(--text-3);
|
||||
font-size: 12.5px;
|
||||
}
|
||||
.dash-empty-panel {
|
||||
padding: 14px 12px;
|
||||
color: var(--text-3);
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ========== Library ========== */
|
||||
.library-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 240px 1fr;
|
||||
flex: 1; /* parent is `.main` (flex col) — fill remaining vertical space (#131) */
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue