mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 22:59:59 -07:00
feat: enhance System Health dashboard with rich telemetry and visualizations
Add SVG arc gauge, per-core CPU bars, temperature sparkline, network interface monitoring with bandwidth deltas, disk I/O rates, 3D globe with observer location, weather overlay, battery/fan/throttle support, and process grid layout. New /system/location and /system/weather endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,32 @@
|
||||
/* System Health Mode Styles */
|
||||
/* System Health Mode Styles — Enhanced Dashboard */
|
||||
|
||||
.sys-dashboard {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Group headers span full width */
|
||||
.sys-group-header {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.12em;
|
||||
color: var(--accent-cyan, #00d4ff);
|
||||
border-bottom: 1px solid rgba(0, 212, 255, 0.2);
|
||||
padding-bottom: 6px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.sys-group-header:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Cards */
|
||||
.sys-card {
|
||||
background: var(--bg-card, #1a1a2e);
|
||||
border: 1px solid var(--border-color, #2a2a4a);
|
||||
@@ -17,6 +35,14 @@
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.sys-card-wide {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.sys-card-full {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.sys-card-header {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
@@ -99,7 +125,252 @@
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Process items */
|
||||
/* SVG Arc Gauge */
|
||||
.sys-gauge-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.sys-gauge-arc {
|
||||
position: relative;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sys-gauge-arc svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sys-gauge-arc .arc-bg {
|
||||
fill: none;
|
||||
stroke: var(--bg-primary, #0d0d1a);
|
||||
stroke-width: 8;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.sys-gauge-arc .arc-fill {
|
||||
fill: none;
|
||||
stroke-width: 8;
|
||||
stroke-linecap: round;
|
||||
transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
|
||||
filter: drop-shadow(0 0 4px currentColor);
|
||||
}
|
||||
|
||||
.sys-gauge-arc .arc-fill.ok { stroke: var(--accent-green, #00ff88); }
|
||||
.sys-gauge-arc .arc-fill.warn { stroke: var(--accent-yellow, #ffcc00); }
|
||||
.sys-gauge-arc .arc-fill.crit { stroke: var(--accent-red, #ff3366); }
|
||||
|
||||
.sys-gauge-label {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
}
|
||||
|
||||
.sys-gauge-details {
|
||||
flex: 1;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Per-core bars */
|
||||
.sys-core-bars {
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
align-items: flex-end;
|
||||
height: 24px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.sys-core-bar {
|
||||
flex: 1;
|
||||
background: var(--bg-primary, #0d0d1a);
|
||||
border-radius: 2px;
|
||||
position: relative;
|
||||
min-width: 4px;
|
||||
max-width: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sys-core-bar-fill {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-radius: 2px;
|
||||
transition: height 0.4s ease, background 0.3s ease;
|
||||
}
|
||||
|
||||
/* Temperature sparkline */
|
||||
.sys-sparkline-wrap {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.sys-sparkline-wrap svg {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.sys-sparkline-line {
|
||||
fill: none;
|
||||
stroke: var(--accent-cyan, #00d4ff);
|
||||
stroke-width: 1.5;
|
||||
filter: drop-shadow(0 0 2px rgba(0, 212, 255, 0.4));
|
||||
}
|
||||
|
||||
.sys-sparkline-area {
|
||||
fill: url(#sparkGradient);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.sys-temp-big {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
/* Network interface rows */
|
||||
.sys-net-iface {
|
||||
padding: 6px 0;
|
||||
border-bottom: 1px solid var(--border-color, #2a2a4a);
|
||||
}
|
||||
|
||||
.sys-net-iface:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sys-net-iface-name {
|
||||
font-weight: 700;
|
||||
color: var(--accent-cyan, #00d4ff);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.sys-net-iface-ip {
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
font-size: 12px;
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
}
|
||||
|
||||
.sys-net-iface-detail {
|
||||
font-size: 10px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
}
|
||||
|
||||
/* Bandwidth arrows */
|
||||
.sys-bandwidth {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-top: 4px;
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.sys-bw-up {
|
||||
color: var(--accent-green, #00ff88);
|
||||
}
|
||||
|
||||
.sys-bw-down {
|
||||
color: var(--accent-cyan, #00d4ff);
|
||||
}
|
||||
|
||||
/* Globe container */
|
||||
.sys-location-inner {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.sys-globe-wrap {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
flex-shrink: 0;
|
||||
background: #000;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sys-location-details {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sys-location-coords {
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
font-size: 13px;
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
}
|
||||
|
||||
.sys-location-source {
|
||||
font-size: 10px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
/* Weather overlay */
|
||||
.sys-weather {
|
||||
margin-top: auto;
|
||||
padding: 10px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border-color, #2a2a4a);
|
||||
}
|
||||
|
||||
.sys-weather-temp {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
}
|
||||
|
||||
.sys-weather-condition {
|
||||
font-size: 12px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.sys-weather-detail {
|
||||
font-size: 10px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Disk I/O indicators */
|
||||
.sys-disk-io {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
margin-top: 8px;
|
||||
font-family: var(--font-mono, 'JetBrains Mono', monospace);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.sys-disk-io-read {
|
||||
color: var(--accent-cyan, #00d4ff);
|
||||
}
|
||||
|
||||
.sys-disk-io-write {
|
||||
color: var(--accent-green, #00ff88);
|
||||
}
|
||||
|
||||
/* Process grid — dot-matrix style */
|
||||
.sys-process-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 4px 12px;
|
||||
}
|
||||
|
||||
.sys-process-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -128,6 +399,12 @@
|
||||
background: var(--text-dim, #555);
|
||||
}
|
||||
|
||||
.sys-process-summary {
|
||||
margin-top: 8px;
|
||||
font-size: 11px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
}
|
||||
|
||||
/* SDR Devices */
|
||||
.sys-sdr-device {
|
||||
padding: 6px 0;
|
||||
@@ -154,6 +431,32 @@
|
||||
background: var(--bg-primary, #0d0d1a);
|
||||
}
|
||||
|
||||
/* System info — horizontal layout */
|
||||
.sys-info-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 20px;
|
||||
font-size: 11px;
|
||||
color: var(--text-dim, #8888aa);
|
||||
}
|
||||
|
||||
.sys-info-item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sys-info-item strong {
|
||||
color: var(--text-primary, #e0e0ff);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Battery indicator */
|
||||
.sys-battery-inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Sidebar Quick Grid */
|
||||
.sys-quick-grid {
|
||||
display: grid;
|
||||
@@ -206,10 +509,36 @@
|
||||
padding: 8px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.sys-card-wide,
|
||||
.sys-card-full {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.sys-location-inner {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sys-globe-wrap {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.sys-process-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 769px) {
|
||||
.sys-dashboard {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.sys-card-wide {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.sys-card-full {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user