fix(dashboard): sezioni PAPER/LIVE evidenti (barra colorata) + Cache-Control no-cache

Le sezioni erano testo grigio poco visibile e il browser cacheava la pagina ('non vedo differenza').
Ora: header PAPER con barra verde, LIVE con barra rossa + sfondo rosso-tenue (separazione netta);
risposta HTTP con Cache-Control no-cache/no-store -> niente pagina stantia.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-20 15:36:21 +00:00
parent cddea50c5a
commit a3d6b97db6
+3 -2
View File
@@ -132,8 +132,8 @@ table{{width:100%;border-collapse:collapse;margin:8px 0 20px}}td,th{{text-align:
th{{color:#8a93a0;font-weight:500}}.y{{display:inline-block;background:#161b22;border:1px solid #222b36;border-radius:6px;padding:3px 8px;margin:2px;font-size:12px}} th{{color:#8a93a0;font-weight:500}}.y{{display:inline-block;background:#161b22;border:1px solid #222b36;border-radius:6px;padding:3px 8px;margin:2px;font-size:12px}}
.box{{background:#161b22;border:1px solid #222b36;border-radius:10px;padding:14px 18px;margin-bottom:18px}} .box{{background:#161b22;border:1px solid #222b36;border-radius:10px;padding:14px 18px;margin-bottom:18px}}
.warn{{color:#f1c40f;font-size:12px}} .warn{{color:#f1c40f;font-size:12px}}
.section{{font-size:13px;font-weight:600;letter-spacing:.05em;margin:30px 0 12px;padding-bottom:7px;border-bottom:1px solid #222b36;color:#8a93a0}} .section{{font-size:15px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin:34px 0 14px;padding:10px 14px;border-radius:9px;background:#12181f;border-left:5px solid #2ecc71;color:#d7dee6}}
.section.live{{color:#e74c3c;border-color:#3a2329}}</style></head><body> .section.live{{border-left-color:#e74c3c;background:#1c1316;color:#f0c4c4}}</style></head><body>
<h1>PythagorasGoal — Portafoglio attivo (TP01 + XS01 + VRP01)</h1> <h1>PythagorasGoal — Portafoglio attivo (TP01 + XS01 + VRP01)</h1>
<div class=sub>monitor · v{d['version']} · ultimo dato {d['last_data']} · esecuzione REALE non attiva (solo micro-test)</div> <div class=sub>monitor · v{d['version']} · ultimo dato {d['last_data']} · esecuzione REALE non attiva (solo micro-test)</div>
<div class="section">PAPER — simulato (backtest + forward virtuale)</div> <div class="section">PAPER — simulato (backtest + forward virtuale)</div>
@@ -174,6 +174,7 @@ class H(BaseHTTPRequestHandler):
body = f"<pre>errore: {type(e).__name__}: {e}</pre>".encode() body = f"<pre>errore: {type(e).__name__}: {e}</pre>".encode()
self.send_response(200) self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8") self.send_header("Content-Type", "text/html; charset=utf-8")
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
self.end_headers(); self.wfile.write(body) self.end_headers(); self.wfile.write(body)