|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>NET-SPROUT // Packet Routing Simulator</title> |
| 7 | + <link rel="stylesheet" href="style.css"> |
| 8 | + <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | + <div id="app"> |
| 12 | + <aside id="left-panel"> |
| 13 | + <div class="brand"> |
| 14 | + <svg class="brand-icon" viewBox="0 0 32 32" width="32" height="32"> |
| 15 | + <circle cx="16" cy="16" r="12" fill="none" stroke="#1b3a24" stroke-width="1.5"/> |
| 16 | + <circle cx="16" cy="16" r="4" fill="#2e7d32"/> |
| 17 | + <line x1="16" y1="4" x2="16" y2="12" stroke="#1b3a24" stroke-width="1.5" stroke-linecap="round"/> |
| 18 | + <line x1="16" y1="20" x2="16" y2="28" stroke="#1b3a24" stroke-width="1.5" stroke-linecap="round"/> |
| 19 | + <line x1="4" y1="16" x2="12" y2="16" stroke="#1b3a24" stroke-width="1.5" stroke-linecap="round"/> |
| 20 | + <line x1="20" y1="16" x2="28" y2="16" stroke="#1b3a24" stroke-width="1.5" stroke-linecap="round"/> |
| 21 | + <line x1="7.5" y1="7.5" x2="13" y2="13" stroke="#a5d6a7" stroke-width="1.5" stroke-linecap="round"/> |
| 22 | + <line x1="24.5" y1="7.5" x2="19" y2="13" stroke="#a5d6a7" stroke-width="1.5" stroke-linecap="round"/> |
| 23 | + <line x1="7.5" y1="24.5" x2="13" y2="19" stroke="#a5d6a7" stroke-width="1.5" stroke-linecap="round"/> |
| 24 | + <line x1="24.5" y1="24.5" x2="19" y2="19" stroke="#a5d6a7" stroke-width="1.5" stroke-linecap="round"/> |
| 25 | + </svg> |
| 26 | + <div class="brand-text"> |
| 27 | + <span class="brand-name">NET-SPROUT</span> |
| 28 | + <span class="brand-sub">// Packet Routing Simulator</span> |
| 29 | + </div> |
| 30 | + </div> |
| 31 | + |
| 32 | + <div class="panel-section"> |
| 33 | + <div class="section-title">Routing Protocol Selection</div> |
| 34 | + <div class="algo-tabs" id="algo-tabs"> |
| 35 | + <button class="algo-tab active" data-algo="dijkstra"> |
| 36 | + <span class="algo-indicator" style="background:#4caf50"></span> |
| 37 | + <span class="algo-label">Dijkstra</span> |
| 38 | + <span class="algo-desc">Link-State Shortest Path</span> |
| 39 | + </button> |
| 40 | + <button class="algo-tab" data-algo="hopcount"> |
| 41 | + <span class="algo-indicator" style="background:#009688"></span> |
| 42 | + <span class="algo-label">Hop-Count</span> |
| 43 | + <span class="algo-desc">Minimal Node Transitions</span> |
| 44 | + </button> |
| 45 | + <button class="algo-tab" data-algo="traffic"> |
| 46 | + <span class="algo-indicator" style="background:#795548"></span> |
| 47 | + <span class="algo-label">Traffic-Aware</span> |
| 48 | + <span class="algo-desc">Dynamic Bottleneck Avoidance</span> |
| 49 | + </button> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + |
| 53 | + <div class="panel-section"> |
| 54 | + <div class="section-title">Topology Manipulation Console</div> |
| 55 | + <div class="control-group"> |
| 56 | + <label>Add Node</label> |
| 57 | + <div class="form-row"> |
| 58 | + <input type="text" id="node-id-input" placeholder="ID (e.g. A or 192.168.1.1)" class="form-input"> |
| 59 | + <select id="node-type-select" class="form-select"> |
| 60 | + <option value="router">Router</option> |
| 61 | + <option value="host">Host</option> |
| 62 | + </select> |
| 63 | + <button class="btn btn-small" id="btn-add-node">+</button> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + <div class="control-group"> |
| 67 | + <label>Add Link</label> |
| 68 | + <div class="form-row"> |
| 69 | + <select id="link-src-select" class="form-select"><option value="">From</option></select> |
| 70 | + <span class="form-arrow">→</span> |
| 71 | + <select id="link-dst-select" class="form-select"><option value="">To</option></select> |
| 72 | + </div> |
| 73 | + <div class="form-row"> |
| 74 | + <input type="range" id="link-bw-slider" min="10" max="1000" value="100" class="form-slider"> |
| 75 | + <span id="link-bw-display" class="form-value">100 Mbps</span> |
| 76 | + </div> |
| 77 | + <div class="form-row"> |
| 78 | + <input type="number" id="link-length-input" value="100" min="1" max="10000" class="form-input form-input-sm"> |
| 79 | + <span class="unit-label">m</span> |
| 80 | + <button class="btn btn-small" id="btn-add-link">+ Link</button> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + <div class="control-group"> |
| 84 | + <label>Remove</label> |
| 85 | + <div class="form-row"> |
| 86 | + <select id="delete-select" class="form-select"><option value="">Select item...</option></select> |
| 87 | + <button class="btn btn-small btn-remove" id="btn-delete">Delete</button> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + |
| 92 | + <div class="panel-section"> |
| 93 | + <div class="section-title">Packet Injection</div> |
| 94 | + <div class="control-group"> |
| 95 | + <div class="form-row"> |
| 96 | + <select id="pkt-src-select" class="form-select"><option value="">Source...</option></select> |
| 97 | + <span class="form-arrow">→</span> |
| 98 | + <select id="pkt-dst-select" class="form-select"><option value="">Dest...</option></select> |
| 99 | + </div> |
| 100 | + <div class="form-row"> |
| 101 | + <input type="range" id="pkt-size-slider" min="64" max="1500" value="1024" class="form-slider"> |
| 102 | + <span id="pkt-size-display" class="form-value">1024 B</span> |
| 103 | + </div> |
| 104 | + <div class="form-row"> |
| 105 | + <input type="number" id="pkt-burst-input" value="1" min="1" max="20" class="form-input form-input-sm"> |
| 106 | + <span class="unit-label">burst</span> |
| 107 | + <button class="btn btn-primary btn-small" id="btn-dispatch">DISPATCH</button> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + |
| 112 | + <div class="panel-section"> |
| 113 | + <div class="section-title">Infrastructure Presets</div> |
| 114 | + <div class="presets"> |
| 115 | + <button class="preset-btn" data-preset="star">Star Topology</button> |
| 116 | + <button class="preset-btn" data-preset="mesh">Mesh Core</button> |
| 117 | + <button class="preset-btn" data-preset="bottleneck">Bottleneck Loop</button> |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + |
| 121 | + <div class="panel-section"> |
| 122 | + <div class="section-title">System Action Nodes</div> |
| 123 | + <div class="action-buttons"> |
| 124 | + <button class="btn btn-primary" id="btn-init">INITIALIZE NETWORK</button> |
| 125 | + <div class="btn-row"> |
| 126 | + <button class="btn btn-danger" id="btn-clear">CLEAR ALL TRAFFIC</button> |
| 127 | + <button class="btn btn-accent" id="btn-export">EXPORT CSV</button> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + </div> |
| 131 | + </aside> |
| 132 | + |
| 133 | + <main id="right-panel"> |
| 134 | + <div class="diag-header"> |
| 135 | + <div class="diag-item"> |
| 136 | + <span class="diag-label">In-Flight</span> |
| 137 | + <span class="diag-value" id="diag-inflight">0</span> |
| 138 | + </div> |
| 139 | + <div class="diag-item"> |
| 140 | + <span class="diag-label">Avg Latency</span> |
| 141 | + <span class="diag-value" id="diag-latency">0 <span class="diag-unit">μs</span></span> |
| 142 | + </div> |
| 143 | + <div class="diag-item"> |
| 144 | + <span class="diag-label">Delivery Rate</span> |
| 145 | + <span class="diag-value" id="diag-delivery">100%</span> |
| 146 | + </div> |
| 147 | + <div class="diag-item"> |
| 148 | + <span class="diag-label">Algorithm</span> |
| 149 | + <span class="diag-value diag-algo" id="diag-algo">Dijkstra</span> |
| 150 | + </div> |
| 151 | + <div class="diag-item"> |
| 152 | + <span class="diag-label">Status</span> |
| 153 | + <span class="diag-value diag-status" id="diag-status"> |
| 154 | + <span class="status-dot awaiting"></span> |
| 155 | + AWAITING |
| 156 | + </span> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + |
| 160 | + <div class="main-content"> |
| 161 | + <div class="canvas-section"> |
| 162 | + <div class="section-header"> |
| 163 | + <span class="section-title">Interactive Network Topology Viewport</span> |
| 164 | + <span class="section-badge" id="canvas-info">Drag nodes to rearrange</span> |
| 165 | + </div> |
| 166 | + <div class="canvas-wrapper"> |
| 167 | + <canvas id="network-canvas"></canvas> |
| 168 | + </div> |
| 169 | + </div> |
| 170 | + |
| 171 | + <div class="telemetry-section"> |
| 172 | + <div class="metric-cards"> |
| 173 | + <div class="metric-card metric-card-wide"> |
| 174 | + <span class="metric-label">Selected Route Path</span> |
| 175 | + <span class="metric-value metric-path" id="metric-path">No active route</span> |
| 176 | + </div> |
| 177 | + <div class="metric-card"> |
| 178 | + <span class="metric-label">Total Delay (D_total)</span> |
| 179 | + <span class="metric-value" id="metric-delay">0 <span class="diag-unit">μs</span></span> |
| 180 | + </div> |
| 181 | + <div class="metric-card"> |
| 182 | + <span class="metric-label">Congestion Index</span> |
| 183 | + <span class="metric-value" id="metric-congestion">0%</span> |
| 184 | + </div> |
| 185 | + </div> |
| 186 | + <div class="chart-wrapper"> |
| 187 | + <canvas id="latency-chart"></canvas> |
| 188 | + </div> |
| 189 | + </div> |
| 190 | + |
| 191 | + <div class="log-section"> |
| 192 | + <div class="section-header"> |
| 193 | + <span class="section-title">Packet Telemetry Log</span> |
| 194 | + <span class="section-badge" id="log-info">0 entries</span> |
| 195 | + </div> |
| 196 | + <div class="log-container"> |
| 197 | + <table id="log-table"> |
| 198 | + <thead> |
| 199 | + <tr> |
| 200 | + <th>Packet ID</th> |
| 201 | + <th>Source</th> |
| 202 | + <th>Dest</th> |
| 203 | + <th>Protocol</th> |
| 204 | + <th>Current Node</th> |
| 205 | + <th>Delay (μs)</th> |
| 206 | + <th>Status</th> |
| 207 | + </tr> |
| 208 | + </thead> |
| 209 | + <tbody id="log-body"> |
| 210 | + </tbody> |
| 211 | + </table> |
| 212 | + </div> |
| 213 | + </div> |
| 214 | + </div> |
| 215 | + |
| 216 | + <div class="status-banner" id="status-banner"> |
| 217 | + <span class="status-dot awaiting"></span> |
| 218 | + <span class="status-text">AWAITING TOPOLOGY DISCOVERY</span> |
| 219 | + </div> |
| 220 | + </main> |
| 221 | + </div> |
| 222 | + <script src="script.js"></script> |
| 223 | +</body> |
| 224 | +</html> |
0 commit comments