|
21 | 21 |
|
22 | 22 | body { |
23 | 23 | font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; |
24 | | - line-height: 1.6; |
25 | | - padding: 30px; |
26 | | - max-width: 1000px; |
| 24 | + /* Data, not prose: 1.6 leading on single-line values reads as gaps. */ |
| 25 | + line-height: 1.45; |
| 26 | + padding: 24px 20px; |
| 27 | + max-width: 1180px; |
27 | 28 | margin: 0 auto; |
28 | 29 | background-color: var(--background-color); |
29 | 30 | color: var(--primary-color); |
|
32 | 33 | h1, |
33 | 34 | h2 { |
34 | 35 | color: var(--primary-color); |
35 | | - margin-bottom: 1rem; |
36 | 36 | border-bottom: 2px solid var(--border-color); |
37 | | - padding-bottom: 0.5rem; |
| 37 | + padding-bottom: 0.3rem; |
| 38 | + } |
| 39 | + |
| 40 | + h1 { |
| 41 | + font-size: 1.6rem; |
| 42 | + margin: 0 0 0.6rem; |
| 43 | + } |
| 44 | + |
| 45 | + h2 { |
| 46 | + font-size: 1.15rem; |
| 47 | + margin: 1.4rem 0 0.6rem; |
38 | 48 | } |
39 | 49 |
|
40 | 50 | textarea { |
|
49 | 59 | resize: vertical; |
50 | 60 | } |
51 | 61 |
|
| 62 | + /* Overflow belongs on a wrapper. Setting it on the table needs |
| 63 | + display:block, which drops the table formatting context and lets |
| 64 | + thead and tbody size themselves independently. */ |
| 65 | + .table-scroll { |
| 66 | + overflow-x: auto; |
| 67 | + margin-top: 12px; |
| 68 | + border-radius: 8px; |
| 69 | + background-color: white; |
| 70 | + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); |
| 71 | + } |
| 72 | + |
52 | 73 | table { |
53 | 74 | width: 100%; |
54 | 75 | border-collapse: separate; |
55 | 76 | border-spacing: 0; |
56 | | - margin-top: 20px; |
57 | | - background-color: white; |
58 | | - border-radius: 8px; |
59 | | - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); |
| 77 | + font-size: 0.92rem; |
60 | 78 | } |
61 | 79 |
|
62 | 80 | th, |
63 | 81 | td { |
64 | | - padding: 15px; |
| 82 | + padding: 7px 10px; |
65 | 83 | text-align: left; |
66 | 84 | border-bottom: 1px solid var(--border-color); |
67 | 85 | } |
68 | 86 |
|
| 87 | + /* An identifier split across two lines is harder to read than a table |
| 88 | + the reader scrolls sideways. */ |
| 89 | + td { |
| 90 | + white-space: nowrap; |
| 91 | + } |
| 92 | + |
69 | 93 | th { |
70 | 94 | background-color: var(--primary-color); |
71 | 95 | color: white; |
72 | 96 | font-weight: 500; |
73 | 97 | } |
74 | 98 |
|
75 | | - th:first-child { |
76 | | - border-top-left-radius: 8px; |
77 | | - } |
78 | | - |
79 | | - th:last-child { |
80 | | - border-top-right-radius: 8px; |
81 | | - } |
82 | | - |
83 | | - tr:last-child td:first-child { |
84 | | - border-bottom-left-radius: 8px; |
85 | | - } |
86 | | - |
87 | | - tr:last-child td:last-child { |
88 | | - border-bottom-right-radius: 8px; |
89 | | - } |
90 | | - |
91 | 99 | tbody tr:hover { |
92 | 100 | background-color: #f5f6f7; |
93 | 101 | } |
|
106 | 114 |
|
107 | 115 | .info-section { |
108 | 116 | background-color: white; |
109 | | - padding: 20px; |
| 117 | + padding: 6px 16px; |
110 | 118 | border-radius: 8px; |
111 | | - margin-bottom: 20px; |
| 119 | + margin-bottom: 14px; |
112 | 120 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); |
113 | 121 | } |
114 | 122 |
|
115 | 123 | .info-grid { |
116 | 124 | display: grid; |
117 | | - gap: 12px; |
118 | | - margin-top: 16px; |
119 | 125 | } |
120 | 126 |
|
121 | 127 | .info-row { |
122 | 128 | display: grid; |
123 | | - grid-template-columns: 200px 1fr; |
| 129 | + grid-template-columns: 190px 1fr; |
124 | 130 | align-items: center; |
125 | | - padding: 4px 12px; |
126 | | - background-color: #f8f9fa; |
127 | | - border-radius: 6px; |
| 131 | + padding: 5px 4px; |
| 132 | + border-bottom: 1px solid var(--border-color); |
| 133 | + } |
| 134 | + |
| 135 | + .info-row:last-child { |
| 136 | + border-bottom: none; |
128 | 137 | } |
129 | 138 |
|
130 | 139 | .info-label { |
|
134 | 143 |
|
135 | 144 | .info-value { |
136 | 145 | font-family: monospace; |
137 | | - background-color: white; |
138 | | - padding: 6px 12px; |
139 | | - border-radius: 4px; |
140 | | - border: 1px solid var(--border-color); |
141 | 146 | word-break: break-all; |
142 | 147 | overflow-wrap: break-word; |
143 | 148 | } |
@@ -254,97 +259,101 @@ <h2>GPUs</h2> |
254 | 259 | {%- endmatch %} |
255 | 260 | </div> |
256 | 261 | </div> |
257 | | - <table> |
258 | | - <thead> |
259 | | - <tr> |
260 | | - <th>Index</th> |
261 | | - <th>PCI</th> |
262 | | - <th>GPU %</th> |
263 | | - <th>Mem %</th> |
264 | | - <th>Memory</th> |
265 | | - <th>Temp</th> |
266 | | - <th>Power</th> |
267 | | - <th>Error</th> |
268 | | - </tr> |
269 | | - </thead> |
270 | | - <tbody> |
271 | | - {% for gpu in gpu_info.gpus %} |
272 | | - <tr> |
273 | | - <td>{{ gpu.index }}</td> |
274 | | - <td>{{ gpu.pci_bus_id|short_bdf }}</td> |
275 | | - <td> |
276 | | - {% match gpu.utilization_gpu %} |
277 | | - {% when Some with (value) %}{{ value }}% |
278 | | - {% when None %}- |
279 | | - {% endmatch %} |
280 | | - </td> |
281 | | - <td> |
282 | | - {% match gpu.utilization_memory %} |
283 | | - {% when Some with (value) %}{{ value }}% |
284 | | - {% when None %}- |
285 | | - {% endmatch %} |
286 | | - </td> |
287 | | - <td> |
288 | | - {% match gpu.memory_used_bytes %} |
289 | | - {% when Some with (used) %} |
290 | | - {% match gpu.memory_total_bytes %} |
291 | | - {% when Some with (total) %}{{ used|hsize }} / {{ total|hsize }} |
292 | | - {% when None %}{{ used|hsize }} |
293 | | - {% endmatch %} |
294 | | - {% when None %} |
295 | | - {% match gpu.memory_total_bytes %} |
296 | | - {% when Some with (total) %}- / {{ total|hsize }} |
297 | | - {% when None %}- |
298 | | - {% endmatch %} |
299 | | - {% endmatch %} |
300 | | - </td> |
301 | | - <td> |
302 | | - {% match gpu.temperature_c %} |
303 | | - {% when Some with (value) %}{{ value }} C |
304 | | - {% when None %}- |
305 | | - {% endmatch %} |
306 | | - </td> |
307 | | - <td> |
308 | | - {% match gpu.power_usage_mw %} |
309 | | - {% when Some with (value) %}{{ "{:.1}"|format(value as f32 / 1000.0) }} W |
310 | | - {% when None %}- |
311 | | - {% endmatch %} |
312 | | - </td> |
313 | | - <td>{{ gpu.errors.join("; ") }}</td> |
314 | | - </tr> |
315 | | - {% endfor %} |
316 | | - </tbody> |
317 | | - </table> |
| 262 | + <div class="table-scroll"> |
| 263 | + <table> |
| 264 | + <thead> |
| 265 | + <tr> |
| 266 | + <th>Index</th> |
| 267 | + <th>PCI</th> |
| 268 | + <th>GPU %</th> |
| 269 | + <th>Mem %</th> |
| 270 | + <th>Memory</th> |
| 271 | + <th>Temp</th> |
| 272 | + <th>Power</th> |
| 273 | + <th>Error</th> |
| 274 | + </tr> |
| 275 | + </thead> |
| 276 | + <tbody> |
| 277 | + {% for gpu in gpu_info.gpus %} |
| 278 | + <tr> |
| 279 | + <td>{{ gpu.index }}</td> |
| 280 | + <td>{{ gpu.pci_bus_id|short_bdf }}</td> |
| 281 | + <td> |
| 282 | + {% match gpu.utilization_gpu %} |
| 283 | + {% when Some with (value) %}{{ value }}% |
| 284 | + {% when None %}- |
| 285 | + {% endmatch %} |
| 286 | + </td> |
| 287 | + <td> |
| 288 | + {% match gpu.utilization_memory %} |
| 289 | + {% when Some with (value) %}{{ value }}% |
| 290 | + {% when None %}- |
| 291 | + {% endmatch %} |
| 292 | + </td> |
| 293 | + <td> |
| 294 | + {% match gpu.memory_used_bytes %} |
| 295 | + {% when Some with (used) %} |
| 296 | + {% match gpu.memory_total_bytes %} |
| 297 | + {% when Some with (total) %}{{ used|hsize }} / {{ total|hsize }} |
| 298 | + {% when None %}{{ used|hsize }} |
| 299 | + {% endmatch %} |
| 300 | + {% when None %} |
| 301 | + {% match gpu.memory_total_bytes %} |
| 302 | + {% when Some with (total) %}- / {{ total|hsize }} |
| 303 | + {% when None %}- |
| 304 | + {% endmatch %} |
| 305 | + {% endmatch %} |
| 306 | + </td> |
| 307 | + <td> |
| 308 | + {% match gpu.temperature_c %} |
| 309 | + {% when Some with (value) %}{{ value }} C |
| 310 | + {% when None %}- |
| 311 | + {% endmatch %} |
| 312 | + </td> |
| 313 | + <td> |
| 314 | + {% match gpu.power_usage_mw %} |
| 315 | + {% when Some with (value) %}{{ "{:.1}"|format(value as f32 / 1000.0) }} W |
| 316 | + {% when None %}- |
| 317 | + {% endmatch %} |
| 318 | + </td> |
| 319 | + <td>{{ gpu.errors.join("; ") }}</td> |
| 320 | + </tr> |
| 321 | + {% endfor %} |
| 322 | + </tbody> |
| 323 | + </table> |
| 324 | + </div> |
318 | 325 | {% endif %} |
319 | 326 | {% endif %} |
320 | 327 |
|
321 | 328 | <h2>Deployed Containers</h2> |
322 | | - <table> |
323 | | - <thead> |
324 | | - <tr> |
325 | | - <th>Name</th> |
326 | | - <th>Status</th> |
327 | | - {% if public_logs %} |
328 | | - <th>Logs</th> |
329 | | - {% endif %} |
330 | | - </tr> |
331 | | - </thead> |
332 | | - <tbody> |
333 | | - {% for container in containers %} |
334 | | - {% set name = container.names.get(0) %} |
335 | | - <tr> |
336 | | - <td>{{name|cname}}</td> |
337 | | - <td>{{container.status}}</td> |
338 | | - {% if public_logs %} |
339 | | - <td> |
340 | | - <a href="/logs/{{name|cname}}?text&bare×tamps&follow&tail=20" target="_blank">View |
341 | | - Logs</a> |
342 | | - </td> |
343 | | - {% endif %} |
344 | | - </tr> |
345 | | - {% endfor %} |
346 | | - </tbody> |
347 | | - </table> |
| 329 | + <div class="table-scroll"> |
| 330 | + <table> |
| 331 | + <thead> |
| 332 | + <tr> |
| 333 | + <th>Name</th> |
| 334 | + <th>Status</th> |
| 335 | + {% if public_logs %} |
| 336 | + <th>Logs</th> |
| 337 | + {% endif %} |
| 338 | + </tr> |
| 339 | + </thead> |
| 340 | + <tbody> |
| 341 | + {% for container in containers %} |
| 342 | + {% set name = container.names.get(0) %} |
| 343 | + <tr> |
| 344 | + <td>{{name|cname}}</td> |
| 345 | + <td>{{container.status}}</td> |
| 346 | + {% if public_logs %} |
| 347 | + <td> |
| 348 | + <a href="/logs/{{name|cname}}?text&bare×tamps&follow&tail=20" target="_blank">View |
| 349 | + Logs</a> |
| 350 | + </td> |
| 351 | + {% endif %} |
| 352 | + </tr> |
| 353 | + {% endfor %} |
| 354 | + </tbody> |
| 355 | + </table> |
| 356 | + </div> |
348 | 357 |
|
349 | 358 | <h2>TCB Info</h2> |
350 | 359 | {% if public_tcbinfo %} |
|
0 commit comments