Add trajectory accumulation, directional flow maps, and dwell time hotspot visualization for occupancy pattern analysis. Backend: - FlowAccumulator records trajectory segments and dwell time in SQLite - REST endpoints for flow map, dwell heatmap, and detected corridors - Bresenham rasterization for flow vector aggregation - Connected component analysis for corridor detection Frontend: - Pattern controls in dashboard sidebar (flow, dwell, corridors toggles) - Time filter dropdown (7d, 30d, all time) - 3D visualization with ArrowHelper for flow, PlaneGeometry for heatmaps - Pulsating animation on flow arrows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1766 lines
48 KiB
HTML
1766 lines
48 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Spaxel Dashboard</title>
|
|
<link rel="stylesheet" href="css/troubleshoot.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
background: #1a1a2e;
|
|
color: #eee;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#scene-container {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* Status bar at top */
|
|
#status-bar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 40px;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
gap: 24px;
|
|
z-index: 100;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.status-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: #666;
|
|
}
|
|
|
|
.status-dot.connected {
|
|
background: #4caf50;
|
|
box-shadow: 0 0 8px #4caf50;
|
|
}
|
|
|
|
.status-dot.disconnected {
|
|
background: #f44336;
|
|
}
|
|
|
|
/* Amplitude chart overlay */
|
|
#chart-panel {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
width: 400px;
|
|
height: 260px;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
z-index: 100;
|
|
}
|
|
|
|
#chart-title {
|
|
font-size: 12px;
|
|
color: #888;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
#chart-title .link-id {
|
|
color: #4fc3f7;
|
|
font-family: monospace;
|
|
}
|
|
|
|
#amplitude-chart {
|
|
width: 100%;
|
|
height: 130px;
|
|
display: block;
|
|
}
|
|
|
|
#chart-divider {
|
|
border: none;
|
|
border-top: 1px solid rgba(255,255,255,0.08);
|
|
margin: 6px 0;
|
|
}
|
|
|
|
#timeseries-label {
|
|
font-size: 10px;
|
|
color: #555;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#timeseries-chart {
|
|
width: 100%;
|
|
height: 64px;
|
|
display: block;
|
|
}
|
|
|
|
/* Node list panel */
|
|
#node-panel {
|
|
position: fixed;
|
|
top: 60px;
|
|
left: 20px;
|
|
width: 280px;
|
|
max-height: calc(100vh - 80px);
|
|
background: rgba(0, 0, 0, 0.8);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
z-index: 100;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#node-panel h3 {
|
|
font-size: 14px;
|
|
color: #888;
|
|
margin-bottom: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.node-item {
|
|
padding: 8px;
|
|
margin-bottom: 4px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.node-item:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.node-item.selected {
|
|
background: rgba(79, 195, 247, 0.2);
|
|
border: 1px solid rgba(79, 195, 247, 0.5);
|
|
}
|
|
|
|
.node-mac {
|
|
font-family: monospace;
|
|
color: #4fc3f7;
|
|
}
|
|
|
|
.node-status {
|
|
float: right;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.node-status.online {
|
|
background: rgba(76, 175, 80, 0.3);
|
|
color: #81c784;
|
|
}
|
|
|
|
.node-status.offline {
|
|
background: rgba(244, 67, 54, 0.3);
|
|
color: #e57373;
|
|
}
|
|
|
|
/* Empty state */
|
|
.empty-state {
|
|
text-align: center;
|
|
color: #666;
|
|
padding: 20px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* Link list */
|
|
.link-section {
|
|
margin-top: 16px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
padding-top: 12px;
|
|
}
|
|
|
|
.link-section h3 {
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: rgba(255, 255, 255, 0.5);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* Pattern visualization controls */
|
|
.pattern-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 0;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.pattern-checkbox:hover {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
.pattern-checkbox input[type="checkbox"] {
|
|
width: 14px;
|
|
height: 14px;
|
|
accent-color: #4fc3f7;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pattern-filter {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.pattern-filter label {
|
|
color: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
.pattern-filter select {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
padding: 4px 8px;
|
|
font-size: 11px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pattern-filter select:focus {
|
|
outline: none;
|
|
border-color: #4fc3f7;
|
|
}
|
|
|
|
.link-item {
|
|
padding: 6px 8px;
|
|
margin-bottom: 4px;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.link-item:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.link-item.selected {
|
|
background: rgba(79, 195, 247, 0.2);
|
|
}
|
|
|
|
/* Presence badge */
|
|
.presence-badge {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.presence-badge.motion {
|
|
background: rgba(244, 67, 54, 0.25);
|
|
color: #ef5350;
|
|
}
|
|
|
|
.presence-badge.clear {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
color: #66bb6a;
|
|
}
|
|
|
|
/* Overall presence indicator in status bar */
|
|
#presence-indicator {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
padding: 3px 8px;
|
|
border-radius: 4px;
|
|
transition: background 0.3s, color 0.3s;
|
|
}
|
|
|
|
#presence-indicator.motion {
|
|
background: rgba(244, 67, 54, 0.3);
|
|
color: #ef5350;
|
|
}
|
|
|
|
#presence-indicator.clear {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: #66bb6a;
|
|
}
|
|
|
|
/* View preset buttons */
|
|
.view-btn {
|
|
background: rgba(255,255,255,0.08);
|
|
border: 1px solid rgba(255,255,255,0.15);
|
|
color: #ccc;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
.view-btn:hover { background: rgba(79,195,247,0.2); color: #4fc3f7; }
|
|
.view-btn.active { background: rgba(79,195,247,0.25); color: #4fc3f7; border-color: #4fc3f7; }
|
|
|
|
#floorplan-btn {
|
|
background: rgba(255,255,255,0.06);
|
|
border: 1px solid rgba(255,255,255,0.12);
|
|
color: #888;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
#floorplan-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }
|
|
|
|
/* Presence panel */
|
|
#presence-panel {
|
|
position: fixed;
|
|
top: 60px;
|
|
right: 20px;
|
|
width: 300px;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
z-index: 100;
|
|
}
|
|
|
|
#presence-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
#presence-header h3 {
|
|
font-size: 14px;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin: 0;
|
|
}
|
|
|
|
#presence-status {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
transition: background 0.3s, color 0.3s;
|
|
}
|
|
|
|
#presence-status.motion {
|
|
background: rgba(244, 67, 54, 0.3);
|
|
color: #ef5350;
|
|
}
|
|
|
|
#presence-status.clear {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: #66bb6a;
|
|
}
|
|
|
|
#presence-list {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.presence-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 5px 8px;
|
|
margin-bottom: 3px;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.presence-row:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.presence-row.selected {
|
|
background: rgba(79, 195, 247, 0.2);
|
|
}
|
|
|
|
.presence-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
transition: background 0.3s;
|
|
}
|
|
|
|
.presence-dot.clear {
|
|
background: #66bb6a;
|
|
box-shadow: 0 0 6px rgba(102, 187, 106, 0.5);
|
|
}
|
|
|
|
.presence-dot.motion {
|
|
background: #ffa726;
|
|
box-shadow: 0 0 6px rgba(255, 167, 38, 0.5);
|
|
}
|
|
|
|
.presence-dot.high-confidence {
|
|
background: #ef5350;
|
|
box-shadow: 0 0 6px rgba(239, 83, 80, 0.5);
|
|
}
|
|
|
|
.presence-link-id {
|
|
font-family: monospace;
|
|
color: #aaa;
|
|
flex: 1;
|
|
}
|
|
|
|
.presence-rms {
|
|
font-family: monospace;
|
|
color: #888;
|
|
font-size: 11px;
|
|
}
|
|
|
|
#deltarms-label {
|
|
font-size: 10px;
|
|
color: #555;
|
|
margin-top: 8px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#deltarms-chart {
|
|
width: 100%;
|
|
height: 80px;
|
|
display: block;
|
|
}
|
|
|
|
/* ===== Onboarding Wizard ===== */
|
|
#wizard-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.85);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
#wizard-card {
|
|
background: #1e1e3a;
|
|
border-radius: 12px;
|
|
padding: 28px 32px 20px;
|
|
max-width: 560px;
|
|
width: 92%;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
#wizard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
#wizard-header h1 {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #eee;
|
|
}
|
|
|
|
.wizard-close {
|
|
background: none;
|
|
border: none;
|
|
color: #888;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.wizard-close:hover {
|
|
color: #eee;
|
|
}
|
|
|
|
/* Step indicator */
|
|
#wizard-steps {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 24px;
|
|
gap: 0;
|
|
}
|
|
|
|
.wizard-step-dot {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
background: #333;
|
|
color: #666;
|
|
transition: all 0.3s;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.wizard-step-dot.active {
|
|
background: #4fc3f7;
|
|
color: #fff;
|
|
box-shadow: 0 0 12px rgba(79, 195, 247, 0.5);
|
|
}
|
|
|
|
.wizard-step-dot.completed {
|
|
background: #4caf50;
|
|
color: #fff;
|
|
}
|
|
|
|
.wizard-step-line {
|
|
width: 20px;
|
|
height: 2px;
|
|
background: #333;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.wizard-step-line.completed {
|
|
background: #4caf50;
|
|
}
|
|
|
|
/* Content */
|
|
#wizard-content {
|
|
min-height: 180px;
|
|
}
|
|
|
|
.wizard-step-content {
|
|
text-align: center;
|
|
}
|
|
|
|
.wizard-step-content h2 {
|
|
font-size: 18px;
|
|
margin-bottom: 8px;
|
|
color: #eee;
|
|
}
|
|
|
|
.wizard-step-content p {
|
|
color: #bbb;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.wizard-muted {
|
|
color: #777 !important;
|
|
font-size: 13px !important;
|
|
}
|
|
|
|
.wizard-center-msg {
|
|
padding: 24px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.wizard-center-msg p {
|
|
color: #888;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.wizard-error {
|
|
color: #ef5350;
|
|
font-size: 13px;
|
|
padding: 10px;
|
|
background: rgba(239, 83, 80, 0.1);
|
|
border-radius: 4px;
|
|
text-align: left;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.wizard-success {
|
|
color: #66bb6a;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.wizard-warn {
|
|
color: #ffa726;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.wizard-icon-large {
|
|
font-size: 48px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.wizard-success-icon {
|
|
color: #66bb6a;
|
|
}
|
|
|
|
.wizard-list {
|
|
text-align: left;
|
|
color: #bbb;
|
|
font-size: 13px;
|
|
line-height: 1.8;
|
|
margin: 12px 0;
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.wizard-list li {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.wizard-details {
|
|
text-align: left;
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.wizard-details summary {
|
|
color: #888;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wizard-details summary:hover {
|
|
color: #bbb;
|
|
}
|
|
|
|
/* Spinner */
|
|
.spinner {
|
|
display: inline-block;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 3px solid rgba(79, 195, 247, 0.2);
|
|
border-top-color: #4fc3f7;
|
|
border-radius: 50%;
|
|
animation: wizard-spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes wizard-spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Progress bar */
|
|
.wizard-progress {
|
|
margin: 16px 0;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 8px;
|
|
background: #333;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #4fc3f7, #29b6f6);
|
|
border-radius: 4px;
|
|
transition: width 0.3s;
|
|
width: 0%;
|
|
}
|
|
|
|
.wizard-progress p {
|
|
font-size: 12px;
|
|
color: #888;
|
|
margin-top: 6px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Buttons */
|
|
.wizard-btn {
|
|
padding: 10px 24px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: background 0.2s, opacity 0.2s;
|
|
}
|
|
|
|
.wizard-btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.wizard-btn-primary {
|
|
background: #4fc3f7;
|
|
color: #1a1a2e;
|
|
}
|
|
|
|
.wizard-btn-primary:hover:not(:disabled) {
|
|
background: #29b6f6;
|
|
}
|
|
|
|
.wizard-btn-secondary {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: #ccc;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.wizard-btn-secondary:hover:not(:disabled) {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
}
|
|
|
|
#wizard-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 20px;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* ===== Link Health Panel ===== */
|
|
.link-health-panel {
|
|
background: rgba(0, 0, 0, 0.85);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.link-health-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.link-health-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.link-health-header h3 {
|
|
font-size: 14px;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin: 0;
|
|
}
|
|
|
|
.link-health-id {
|
|
font-family: monospace;
|
|
font-size: 11px;
|
|
color: #4fc3f7;
|
|
}
|
|
|
|
.link-health-empty {
|
|
color: #666;
|
|
text-align: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* Composite score gauge */
|
|
.link-health-composite {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.composite-gauge {
|
|
flex: 1;
|
|
height: 8px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.gauge-fill {
|
|
height: 100%;
|
|
transition: width 0.3s, background 0.3s;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.gauge-fill.score-good { background: linear-gradient(90deg, #66bb6a, #22c55e); }
|
|
.gauge-fill.score-fair { background: linear-gradient(90deg, #ffa726, #eab308); }
|
|
.gauge-fill.score-poor { background: linear-gradient(90deg, #ef5350, #dc2626); }
|
|
|
|
.composite-score {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
min-width: 45px;
|
|
text-align: right;
|
|
}
|
|
|
|
.composite-label {
|
|
font-size: 11px;
|
|
color: #888;
|
|
min-width: 80px;
|
|
}
|
|
|
|
/* Per-metric gauges */
|
|
.link-health-metrics {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 6px;
|
|
}
|
|
|
|
.metric-gauge {
|
|
padding: 6px;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.metric-bar {
|
|
height: 4px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.metric-fill {
|
|
height: 100%;
|
|
transition: width 0.3s, background 0.3s;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.metric-fill.metric-excellent { background: #22c55e; }
|
|
.metric-fill.metric-good { background: #66bb6a; }
|
|
.metric-fill.metric-fair { background: #eab308; }
|
|
.metric-fill.metric-poor { background: #f97316; }
|
|
.metric-fill.metric-critical { background: #ef4444; }
|
|
|
|
.metric-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.metric-name {
|
|
color: #888;
|
|
}
|
|
|
|
.metric-value {
|
|
color: #ccc;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* "Why is this low?" hint */
|
|
.link-health-hint {
|
|
background: rgba(255, 167, 38, 0.1);
|
|
border: 1px solid rgba(255, 167, 38, 0.3);
|
|
border-radius: 4px;
|
|
padding: 8px 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.hint-header {
|
|
color: #ffa726;
|
|
font-weight: 500;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.hint-metric {
|
|
color: #ccc;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.hint-text {
|
|
color: #888;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Sparkline sections */
|
|
.link-health-sparkline-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.sparkline-label {
|
|
font-size: 10px;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.sparkline-canvas {
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.sparkline-annotations {
|
|
display: flex;
|
|
gap: 12px;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.sparkline-best { color: #66bb6a; }
|
|
.sparkline-worst { color: #ef5350; }
|
|
.sparkline-empty { color: #555; }
|
|
|
|
/* Diagnoses cards */
|
|
.link-health-diagnoses {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.diagnosis-card {
|
|
padding: 8px 10px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.diagnosis-card.severity-info {
|
|
background: rgba(79, 195, 247, 0.1);
|
|
border-left: 3px solid #4fc3f7;
|
|
}
|
|
|
|
.diagnosis-card.severity-warning {
|
|
background: rgba(255, 167, 38, 0.1);
|
|
border-left: 3px solid #ffa726;
|
|
}
|
|
|
|
.diagnosis-card.severity-actionable {
|
|
background: rgba(239, 83, 80, 0.1);
|
|
border-left: 3px solid #ef5350;
|
|
}
|
|
|
|
.diagnosis-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.diagnosis-icon {
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.diagnosis-title {
|
|
font-weight: 500;
|
|
flex: 1;
|
|
}
|
|
|
|
.diagnosis-confidence {
|
|
font-size: 10px;
|
|
color: #888;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.diagnosis-detail {
|
|
color: #888;
|
|
font-size: 11px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.diagnosis-advice {
|
|
color: #aaa;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.diagnosis-reposition {
|
|
margin-top: 6px;
|
|
padding: 6px;
|
|
background: rgba(76, 175, 80, 0.1);
|
|
border-radius: 3px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.reposition-target {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.gdop-improvement {
|
|
color: #66bb6a;
|
|
font-size: 10px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.reposition-apply-btn {
|
|
background: rgba(76, 175, 80, 0.3);
|
|
border: 1px solid rgba(76, 175, 80, 0.5);
|
|
color: #66bb6a;
|
|
font-size: 11px;
|
|
padding: 4px 10px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.reposition-apply-btn:hover {
|
|
background: rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
.link-health-no-issues {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #66bb6a;
|
|
padding: 8px;
|
|
background: rgba(76, 175, 80, 0.1);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.no-issues-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* ===== System-wide Detection Quality Gauge ===== */
|
|
#detection-quality {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 2px 10px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
#detection-quality:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
#quality-gauge-container {
|
|
position: relative;
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
#quality-gauge {
|
|
width: 32px;
|
|
height: 32px;
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
#quality-gauge-bg {
|
|
fill: none;
|
|
stroke: rgba(255, 255, 255, 0.1);
|
|
stroke-width: 3;
|
|
}
|
|
|
|
#quality-gauge-fill {
|
|
fill: none;
|
|
stroke: #66bb6a;
|
|
stroke-width: 3;
|
|
stroke-linecap: round;
|
|
stroke-dasharray: 0 100;
|
|
transition: stroke-dasharray 0.5s, stroke 0.3s;
|
|
}
|
|
|
|
#quality-value {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
color: #ccc;
|
|
}
|
|
|
|
#quality-label {
|
|
font-size: 11px;
|
|
color: #888;
|
|
}
|
|
|
|
#quality-tooltip {
|
|
position: absolute;
|
|
top: 45px;
|
|
right: 0;
|
|
background: rgba(0, 0, 0, 0.95);
|
|
border-radius: 4px;
|
|
padding: 8px 12px;
|
|
font-size: 11px;
|
|
white-space: nowrap;
|
|
z-index: 200;
|
|
display: none;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
#detection-quality:hover #quality-tooltip {
|
|
display: block;
|
|
}
|
|
|
|
#quality-tooltip .tooltip-title {
|
|
color: #888;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#quality-tooltip .tooltip-worst {
|
|
color: #ef5350;
|
|
}
|
|
|
|
/* ===== Diurnal Learning Banner ===== */
|
|
#diurnal-banner {
|
|
position: fixed;
|
|
top: 45px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: linear-gradient(135deg, rgba(33, 150, 243, 0.9), rgba(100, 181, 246, 0.9));
|
|
color: #fff;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
display: none;
|
|
align-items: center;
|
|
gap: 10px;
|
|
z-index: 150;
|
|
box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
|
|
}
|
|
|
|
#diurnal-banner.visible {
|
|
display: flex;
|
|
}
|
|
|
|
#diurnal-banner .progress-bar {
|
|
width: 60px;
|
|
height: 6px;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#diurnal-banner .progress-fill {
|
|
height: 100%;
|
|
background: #fff;
|
|
border-radius: 3px;
|
|
transition: width 0.5s;
|
|
}
|
|
|
|
#diurnal-banner .dismiss-btn {
|
|
background: none;
|
|
border: none;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
opacity: 0.7;
|
|
font-size: 16px;
|
|
}
|
|
|
|
#diurnal-banner .dismiss-btn:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ===== Toast Notifications ===== */
|
|
#toast-container {
|
|
position: fixed;
|
|
bottom: 80px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 200;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast {
|
|
background: rgba(0, 0, 0, 0.9);
|
|
color: #fff;
|
|
padding: 12px 20px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
animation: toast-slide-in 0.3s ease-out;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.toast.success {
|
|
background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(102, 187, 106, 0.95));
|
|
}
|
|
|
|
.toast.info {
|
|
background: linear-gradient(135deg, rgba(33, 150, 243, 0.95), rgba(100, 181, 246, 0.95));
|
|
}
|
|
|
|
.toast.warning {
|
|
background: linear-gradient(135deg, rgba(255, 152, 0, 0.95), rgba(255, 183, 77, 0.95));
|
|
}
|
|
|
|
@keyframes toast-slide-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes toast-fade-out {
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* Form */
|
|
.wizard-form {
|
|
text-align: left;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 13px;
|
|
color: #aaa;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
border-radius: 4px;
|
|
color: #eee;
|
|
font-size: 14px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.form-group input:focus {
|
|
outline: none;
|
|
border-color: #4fc3f7;
|
|
box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
|
|
}
|
|
|
|
.form-group input::placeholder {
|
|
color: #555;
|
|
}
|
|
|
|
/* ESP32 illustration */
|
|
.esp32-illustration {
|
|
margin: 16px auto;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Calibration phases */
|
|
.calibrate-phase {
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.calibrate-phase-number {
|
|
font-size: 11px;
|
|
color: #4fc3f7;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.calibrate-phase h3 {
|
|
font-size: 16px;
|
|
color: #eee;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.calibrate-phase p {
|
|
color: #bbb;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Add Node button in status bar */
|
|
#add-node-btn {
|
|
background: rgba(79, 195, 247, 0.15);
|
|
border: 1px solid rgba(79, 195, 247, 0.4);
|
|
color: #4fc3f7;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
#add-node-btn:hover {
|
|
background: rgba(79, 195, 247, 0.25);
|
|
}
|
|
|
|
/* Room editor button */
|
|
#room-editor-btn {
|
|
background: rgba(255,255,255,0.06);
|
|
border: 1px solid rgba(255,255,255,0.12);
|
|
color: #888;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
#room-editor-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }
|
|
#room-editor-btn.active { background: rgba(79,195,247,0.2); color: #4fc3f7; border-color: #4fc3f7; }
|
|
|
|
/* GDOP toggle */
|
|
#gdop-toggle-btn {
|
|
background: rgba(255,255,255,0.06);
|
|
border: 1px solid rgba(255,255,255,0.12);
|
|
color: #888;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
#gdop-toggle-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }
|
|
#gdop-toggle-btn.active { background: rgba(76,175,80,0.25); color: #66bb6a; border-color: #66bb6a; }
|
|
|
|
/* Virtual node status badge */
|
|
.node-status.virtual {
|
|
background: rgba(128, 203, 196, 0.25);
|
|
color: #80cbc4;
|
|
}
|
|
|
|
/* Delete node button */
|
|
#delete-node-btn {
|
|
background: rgba(244, 67, 54, 0.15);
|
|
border: 1px solid rgba(244, 67, 54, 0.4);
|
|
color: #e57373;
|
|
font-size: 11px;
|
|
padding: 2px 8px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
display: none;
|
|
}
|
|
#delete-node-btn:hover {
|
|
background: rgba(244, 67, 54, 0.3);
|
|
}
|
|
|
|
/* Node firmware display */
|
|
.node-fw {
|
|
font-size: 10px;
|
|
color: #666;
|
|
margin-left: 6px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
/* OTA rollback badge */
|
|
.node-rollback-badge {
|
|
background: rgba(244, 67, 54, 0.35);
|
|
color: #ef5350;
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
margin-left: 6px;
|
|
animation: rollback-pulse 1.5s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes rollback-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.6; }
|
|
}
|
|
|
|
/* OTA in-progress badge */
|
|
.node-ota-badge {
|
|
background: rgba(255, 167, 38, 0.35);
|
|
color: #ffa726;
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
margin-left: 6px;
|
|
}
|
|
|
|
/* OTA verified badge */
|
|
.node-verified-badge {
|
|
background: rgba(76, 175, 80, 0.35);
|
|
color: #66bb6a;
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
margin-left: 6px;
|
|
}
|
|
|
|
/* OTA panel button in status bar */
|
|
#ota-btn {
|
|
background: rgba(255, 255, 255, 0.06);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
color: #888;
|
|
font-size: 12px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
#ota-btn:hover {
|
|
background: rgba(255, 255, 255, 0.12);
|
|
color: #ccc;
|
|
}
|
|
#ota-btn.has-update {
|
|
background: rgba(76, 175, 80, 0.2);
|
|
border-color: rgba(76, 175, 80, 0.4);
|
|
color: #66bb6a;
|
|
}
|
|
#ota-btn.in-progress {
|
|
background: rgba(255, 167, 38, 0.2);
|
|
border-color: rgba(255, 167, 38, 0.4);
|
|
color: #ffa726;
|
|
}
|
|
|
|
/* Room editor panel */
|
|
#room-editor-panel {
|
|
position: fixed;
|
|
top: 60px;
|
|
left: 320px;
|
|
width: 240px;
|
|
background: rgba(0, 0, 0, 0.85);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
z-index: 100;
|
|
display: none;
|
|
}
|
|
|
|
#room-editor-panel h3 {
|
|
font-size: 14px;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.room-field {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.room-field label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: #aaa;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.room-field input {
|
|
width: 100%;
|
|
padding: 6px 10px;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
border-radius: 4px;
|
|
color: #eee;
|
|
font-size: 14px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.room-field input:focus {
|
|
outline: none;
|
|
border-color: #4fc3f7;
|
|
box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
|
|
}
|
|
|
|
.room-field .unit {
|
|
font-size: 11px;
|
|
color: #666;
|
|
margin-left: 4px;
|
|
}
|
|
|
|
#room-apply-btn {
|
|
width: 100%;
|
|
padding: 8px;
|
|
background: #4fc3f7;
|
|
color: #1a1a2e;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
margin-top: 4px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
#room-apply-btn:hover {
|
|
background: #29b6f6;
|
|
}
|
|
|
|
/* GDOP legend */
|
|
#gdop-legend {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
left: 320px;
|
|
background: rgba(0, 0, 0, 0.85);
|
|
border-radius: 6px;
|
|
padding: 10px 14px;
|
|
z-index: 100;
|
|
display: none;
|
|
font-size: 11px;
|
|
}
|
|
|
|
#gdop-legend.visible {
|
|
display: block;
|
|
}
|
|
|
|
#gdop-legend h4 {
|
|
font-size: 11px;
|
|
color: #888;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
#gdop-gradient {
|
|
width: 140px;
|
|
height: 12px;
|
|
border-radius: 3px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#gdop-labels {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
color: #888;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* esp-web-install-button overrides */
|
|
esp-web-install-button {
|
|
display: block;
|
|
}
|
|
|
|
esp-web-install-button::part(button) {
|
|
background: #4fc3f7;
|
|
color: #1a1a2e;
|
|
border: none;
|
|
padding: 10px 24px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Diurnal learning banner -->
|
|
<div id="diurnal-banner">
|
|
<span>📅</span>
|
|
<span id="diurnal-message">Learning your home's daily patterns...</span>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill" id="diurnal-progress" style="width: 0%"></div>
|
|
</div>
|
|
<span id="diurnal-days-left">7 days left</span>
|
|
<button class="dismiss-btn" onclick="this.parentElement.classList.remove('visible')">×</button>
|
|
</div>
|
|
|
|
<!-- Toast notification container -->
|
|
<div id="toast-container"></div>
|
|
|
|
<!-- Status bar -->
|
|
<div id="status-bar">
|
|
<div class="status-item">
|
|
<div id="ws-status" class="status-dot disconnected"></div>
|
|
<span id="ws-status-text">Disconnected</span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span>Nodes: <strong id="node-count">0</strong></span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span>Links: <strong id="link-count">0</strong></span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span id="presence-indicator" class="clear">CLEAR</span>
|
|
</div>
|
|
<div class="status-item" id="detection-quality">
|
|
<div id="quality-gauge-container">
|
|
<svg id="quality-gauge" viewBox="0 0 32 32">
|
|
<circle id="quality-gauge-bg" cx="16" cy="16" r="13"/>
|
|
<circle id="quality-gauge-fill" cx="16" cy="16" r="13"/>
|
|
</svg>
|
|
<span id="quality-value">--</span>
|
|
</div>
|
|
<span id="quality-label">Quality</span>
|
|
<div id="quality-tooltip">
|
|
<div class="tooltip-title">Detection Quality</div>
|
|
<div>Based on <span id="quality-link-count">0</span> active links</div>
|
|
<div>Weakest: <span id="quality-worst-link" class="tooltip-worst">--</span> at <span id="quality-worst-score">--%</span></div>
|
|
</div>
|
|
</div>
|
|
<div class="status-item" style="margin-left:auto; gap:6px;">
|
|
<button id="add-node-btn" onclick="SpaxelOnboard && SpaxelOnboard.start()">+ Add Node</button>
|
|
<button id="add-virtual-btn" onclick="Placement && Placement.addVirtualNode()">+ Virtual</button>
|
|
<button class="view-btn active" id="view-perspective" onclick="Viz3D.setViewPreset('perspective')">3D</button>
|
|
<button class="view-btn" id="view-topdown" onclick="Viz3D.setViewPreset('topdown')">Top</button>
|
|
<button class="view-btn" id="view-follow" onclick="Viz3D.setViewPreset('follow')">Follow</button>
|
|
<button id="gdop-toggle-btn" onclick="Placement && Placement.toggleGDOP()">GDOP</button>
|
|
<button id="room-editor-btn" onclick="Placement && Placement.toggleRoomEditor()">Room</button>
|
|
<button id="floorplan-btn" onclick="document.getElementById('floorplan-input').click()">Floor plan</button>
|
|
<input id="floorplan-input" type="file" accept="image/*" style="display:none"
|
|
onchange="Viz3D.uploadFloorPlan(this.files[0]); this.value=''">
|
|
</div>
|
|
<div class="status-item">
|
|
<span>FPS: <strong id="fps-counter">0</strong></span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 3D Scene container -->
|
|
<div id="scene-container"></div>
|
|
|
|
<!-- Node panel -->
|
|
<div id="node-panel">
|
|
<h3>Nodes <button id="delete-node-btn" onclick="Placement && Placement.deleteSelectedNode()">Delete</button></h3>
|
|
<div id="node-list">
|
|
<div class="empty-state">No nodes connected</div>
|
|
</div>
|
|
<div class="link-section">
|
|
<h3>Links</h3>
|
|
<div id="link-list">
|
|
<div class="empty-state">No links active</div>
|
|
</div>
|
|
</div>
|
|
<div class="link-section">
|
|
<h3>Patterns</h3>
|
|
<div id="patterns-controls">
|
|
<label class="pattern-checkbox">
|
|
<input type="checkbox" id="flow-toggle" onchange="toggleFlowLayer(this.checked)">
|
|
<span>Movement flows</span>
|
|
</label>
|
|
<label class="pattern-checkbox">
|
|
<input type="checkbox" id="dwell-toggle" onchange="toggleDwellLayer(this.checked)">
|
|
<span>Dwell hotspots</span>
|
|
</label>
|
|
<label class="pattern-checkbox">
|
|
<input type="checkbox" id="corridor-toggle" onchange="toggleCorridorLayer(this.checked)">
|
|
<span>Corridors</span>
|
|
</label>
|
|
<div class="pattern-filter">
|
|
<label>Time:</label>
|
|
<select id="flow-time-filter" onchange="setFlowTimeFilter(this.value)">
|
|
<option value="7d">Last 7 days</option>
|
|
<option value="30d" selected>Last 30 days</option>
|
|
<option value="all">All time</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Amplitude chart -->
|
|
<div id="chart-panel">
|
|
<div id="chart-title">Amplitude — <span class="link-id">no link selected</span></div>
|
|
<canvas id="amplitude-chart"></canvas>
|
|
<hr id="chart-divider">
|
|
<div id="timeseries-label">Mean amplitude (60 s)</div>
|
|
<canvas id="timeseries-chart"></canvas>
|
|
</div>
|
|
|
|
<!-- Presence panel -->
|
|
<div id="presence-panel">
|
|
<div id="presence-header">
|
|
<h3>Presence</h3>
|
|
<span id="presence-status" class="clear">CLEAR</span>
|
|
</div>
|
|
<div id="presence-list">
|
|
<div class="empty-state">No links active</div>
|
|
</div>
|
|
<div id="deltarms-label">Delta RMS (10 s)</div>
|
|
<canvas id="deltarms-chart"></canvas>
|
|
</div>
|
|
|
|
<!-- Three.js from CDN -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
|
<!-- OrbitControls from CDN -->
|
|
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/controls/OrbitControls.js"></script>
|
|
<!-- TransformControls from CDN -->
|
|
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/controls/TransformControls.js"></script>
|
|
|
|
<!-- 3-D spatial visualisation layer -->
|
|
<script src="js/viz3d.js"></script>
|
|
<!-- Node placement, GDOP coverage, room editor -->
|
|
<script src="js/placement.js"></script>
|
|
<!-- Troubleshooting manager (must load before app.js) -->
|
|
<script src="js/troubleshoot.js"></script>
|
|
<!-- First-time feature tooltips (must load before app.js) -->
|
|
<script src="js/tooltips.js"></script>
|
|
<!-- Main application -->
|
|
<script src="js/app.js"></script>
|
|
<!-- esp-web-tools for firmware flashing (Web Serial) -->
|
|
<script type="module" src="https://espressif.github.io/esp-web-tools/dist/web/install-button.js"></script>
|
|
<!-- Onboarding wizard -->
|
|
<script src="js/onboard.js"></script>
|
|
<!-- OTA firmware management -->
|
|
<script src="js/ota.js"></script>
|
|
<!-- Link health panel -->
|
|
<script src="js/linkhealth.js"></script>
|
|
<!-- Feedback UI for detection accuracy -->
|
|
<script src="js/feedback.js"></script>
|
|
<!-- Accuracy panel for metrics -->
|
|
<script src="js/accuracy.js"></script>
|
|
|
|
<!-- Room editor panel -->
|
|
<div id="room-editor-panel">
|
|
<h3>Room Dimensions</h3>
|
|
<div class="room-field">
|
|
<label>Width <span class="unit">(m)</span></label>
|
|
<input type="number" id="room-width" value="6" min="1" max="100" step="0.5">
|
|
</div>
|
|
<div class="room-field">
|
|
<label>Depth <span class="unit">(m)</span></label>
|
|
<input type="number" id="room-depth" value="5" min="1" max="100" step="0.5">
|
|
</div>
|
|
<div class="room-field">
|
|
<label>Height <span class="unit">(m)</span></label>
|
|
<input type="number" id="room-height" value="2.5" min="1" max="50" step="0.1">
|
|
</div>
|
|
<button id="room-apply-btn" onclick="Placement && Placement.applyRoomFromEditor()">Apply</button>
|
|
</div>
|
|
|
|
<!-- GDOP legend -->
|
|
<div id="gdop-legend">
|
|
<h4>GDOP Coverage</h4>
|
|
<canvas id="gdop-gradient" width="140" height="12"></canvas>
|
|
<div id="gdop-labels">
|
|
<span>Excellent</span>
|
|
<span>Good</span>
|
|
<span>Fair</span>
|
|
<span>Poor</span>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
// Keep view-preset buttons in sync with active state
|
|
['perspective','topdown','follow'].forEach(function(p) {
|
|
document.getElementById('view-' + p).addEventListener('click', function() {
|
|
document.querySelectorAll('.view-btn').forEach(function(b) { b.classList.remove('active'); });
|
|
this.classList.add('active');
|
|
});
|
|
});
|
|
|
|
// Draw GDOP legend gradient
|
|
(function() {
|
|
var c = document.getElementById('gdop-gradient');
|
|
if (!c) return;
|
|
var ctx = c.getContext('2d');
|
|
var grad = ctx.createLinearGradient(0, 0, 140, 0);
|
|
grad.addColorStop(0.00, 'rgb(30,200,80)');
|
|
grad.addColorStop(0.25, 'rgb(140,220,50)');
|
|
grad.addColorStop(0.50, 'rgb(240,210,40)');
|
|
grad.addColorStop(0.75, 'rgb(240,130,30)');
|
|
grad.addColorStop(1.00, 'rgb(210,40,30)');
|
|
ctx.fillStyle = grad;
|
|
ctx.beginPath();
|
|
ctx.roundRect(0, 0, 140, 12, 3);
|
|
ctx.fill();
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|