feat(portfolio): add ze manual page at /ze

- Add ze-manual-html ConfigMap serving ze-manual.html at /ze/index.html
- Mount ze-manual-html in nginx at /usr/share/nginx/html/ze
- Add Projects section in portfolio index with ze card linking to /ze
This commit is contained in:
2026-05-16 11:21:44 +00:00
parent 530177cd6e
commit 9508ddffee
3 changed files with 489 additions and 321 deletions
+143 -321
View File
@@ -1,326 +1,148 @@
apiVersion: v1
data:
index.html: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\"
/>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"
/>\n <title>ChemaVX</title>\n <style>\n *, *::before, *::after { box-sizing:
border-box; margin: 0; padding: 0; }\n\n :root {\n --bg: #0d1117;\n
\ --surface: #161b22;\n --border: #30363d;\n --text: #e6edf3;\n
\ --muted: #8b949e;\n --accent: #58a6ff;\n --green: #3fb950;\n
\ --red: #f85149;\n --yellow: #d29922;\n --purple: #bc8cff;\n
\ }\n\n body {\n background: var(--bg);\n color: var(--text);\n
\ font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica,
Arial, sans-serif;\n min-height: 100vh;\n display: flex;\n flex-direction:
column;\n align-items: center;\n padding: 3rem 1.5rem 4rem;\n }\n\n
\ /* ── Header ─────────────────────────────────── */\n header {\n text-align:
center;\n margin-bottom: 3.5rem;\n }\n .avatar {\n width: 80px;
height: 80px;\n border-radius: 50%;\n background: linear-gradient(135deg,
#1f6feb 0%, #bc8cff 100%);\n display: flex; align-items: center; justify-content:
center;\n font-size: 2rem; font-weight: 700; color: #fff;\n margin:
0 auto 1.25rem;\n box-shadow: 0 0 0 3px var(--border);\n }\n h1 { font-size:
2rem; font-weight: 700; letter-spacing: -0.5px; }\n .tagline {\n color:
var(--muted); font-size: 0.95rem; margin-top: 0.4rem;\n }\n .dot { display:
inline-block; width: 8px; height: 8px;\n border-radius: 50%; background:
var(--green);\n margin-right: 6px; animation: pulse 2s infinite; }\n
\ @keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity:
0.4; }\n }\n\n /* ── Section title ───────────────────────────── */\n .section-title
{\n font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;\n text-transform:
uppercase; color: var(--muted);\n margin-bottom: 0.875rem;\n }\n\n /*
── Services grid ───────────────────────────── */\n .services-grid {\n display:
grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap:
0.75rem;\n width: 100%; max-width: 720px;\n margin-bottom: 2.5rem;\n
\ }\n .service-card {\n background: var(--surface);\n border: 1px
solid var(--border);\n border-radius: 10px;\n padding: 1rem 1.1rem;\n
\ text-decoration: none;\n color: var(--text);\n transition: border-color
0.15s, transform 0.15s, box-shadow 0.15s;\n display: flex; align-items: center;
gap: 0.65rem;\n }\n .service-card:hover {\n border-color: var(--accent);\n
\ transform: translateY(-2px);\n box-shadow: 0 4px 16px rgba(88,166,255,0.1);\n
\ }\n .service-icon { font-size: 1.3rem; flex-shrink: 0; }\n .service-name
{ font-size: 0.9rem; font-weight: 500; }\n\n /* ── Polymarket card ───────────────────────────
*/\n .poly-wrapper { width: 100%; max-width: 720px; }\n .poly-card {\n background:
var(--surface);\n border: 1px solid var(--border);\n border-radius:
12px;\n padding: 1.5rem;\n margin-bottom: 2.5rem;\n }\n .poly-header
{\n display: flex; align-items: center; justify-content: space-between;\n
\ margin-bottom: 1.25rem;\n }\n .poly-title {\n display: flex;
align-items: center; gap: 0.5rem;\n font-size: 0.95rem; font-weight: 600;\n
\ }\n .poly-badge {\n font-size: 0.65rem; font-weight: 600; letter-spacing:
0.04em;\n padding: 2px 7px; border-radius: 20px;\n background: rgba(188,140,255,0.15);
color: var(--purple);\n border: 1px solid rgba(188,140,255,0.3);\n }\n
\ #poly-updated {\n font-size: 0.72rem; color: var(--muted);\n }\n\n
\ .metrics-grid {\n display: grid;\n grid-template-columns: repeat(2,
1fr);\n gap: 0.75rem;\n }\n @media (min-width: 480px) {\n .metrics-grid
{ grid-template-columns: repeat(4, 1fr); }\n }\n .metric {\n background:
var(--bg);\n border: 1px solid var(--border);\n border-radius: 8px;\n
\ padding: 0.875rem 1rem;\n }\n .metric-label {\n font-size: 0.68rem;
color: var(--muted);\n text-transform: uppercase; letter-spacing: 0.06em;\n
\ margin-bottom: 0.35rem;\n }\n .metric-value {\n font-size: 1.35rem;
font-weight: 700; font-variant-numeric: tabular-nums;\n transition: color
0.3s;\n }\n .metric-value.positive { color: var(--green); }\n .metric-value.negative
{ color: var(--red); }\n .metric-value.neutral { color: var(--text); }\n .metric-value.loading
\ { color: var(--muted); font-size: 1rem; }\n\n /* ── Footer ────────────────────────────────────
*/\n footer {\n color: var(--muted); font-size: 0.75rem; text-align: center;\n
\ width: 100%; max-width: 720px;\n border-top: 1px solid var(--border);\n
\ padding-top: 1.25rem;\n }\n footer a { color: var(--accent); text-decoration:
none; }\n footer a:hover { text-decoration: underline; }\n </style>\n</head>\n<body>\n\n
\ <header>\n <div class=\"avatar\">C</div>\n <h1>ChemaVX</h1>\n <p class=\"tagline\">\n
\ <span class=\"dot\"></span>Homelab · k3s · Self-hosted\n </p>\n </header>\n\n
\ <!-- Services -->\n <div style=\"width:100%;max-width:720px;margin-bottom:2.5rem;\">\n
\ <p class=\"section-title\">Services</p>\n <div class=\"services-grid\">\n
\ <a class=\"service-card\" href=\"https://grafana.chemavx.xyz\" target=\"_blank\"
rel=\"noopener\">\n <span class=\"service-icon\">\U0001F4CA</span>\n <span
class=\"service-name\">Grafana</span>\n </a>\n <a class=\"service-card\"
href=\"https://n8n.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n <span
class=\"service-icon\">⚙️</span>\n <span class=\"service-name\">n8n</span>\n
\ </a>\n <a class=\"service-card\" href=\"https://home.chemavx.xyz\"
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F3E0</span>\n
\ <span class=\"service-name\">Homarr</span>\n </a>\n <a class=\"service-card\"
href=\"https://polymarket.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n
\ <span class=\"service-icon\">\U0001F4C8</span>\n <span class=\"service-name\">Polymarket
Bot</span>\n </a>\n <a class=\"service-card\" href=\"https://chat.chemavx.xyz\"
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F916</span>\n
\ <span class=\"service-name\">Open WebUI</span>\n </a>\n <a class=\"service-card\"
href=\"https://git.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n <span
class=\"service-icon\">\U0001F419</span>\n <span class=\"service-name\">Gitea</span>\n
\ </a>\n <a class=\"service-card\" href=\"https://argocd.chemavx.xyz\"
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F504</span>\n
\ <span class=\"service-name\">ArgoCD</span>\n </a>\n <a class=\"service-card\"
href=\"https://vaultwarden.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n
\ <span class=\"service-icon\">\U0001F510</span>\n <span class=\"service-name\">Vaultwarden</span>\n
\ </a>\n </div>\n </div>\n\n <!-- Projects -->\n <div style=\"width:100%;max-width:720px;margin-bottom:2.5rem;\">\n
\ <p class=\"section-title\">Projects</p>\n <div class=\"services-grid\">\n
\ <a class=\"service-card\" href=\"/ze\">\n <span class=\"service-icon\">\U0001F6F8</span>\n
\ <span class=\"service-name\">ze</span>\n </a>\n </div>\n </div>\n\n
\ <!-- Polymarket live metrics -->\n <div class=\"poly-wrapper\">\n <p class=\"section-title\">Polymarket
Bot — Live</p>\n <div class=\"poly-card\">\n <div class=\"poly-header\">\n
\ <div class=\"poly-title\">\n <span>\U0001F4C8</span>\n <span>Portfolio
Summary</span>\n <span class=\"poly-badge\" id=\"poly-mode\">PAPER</span>\n
\ </div>\n <span id=\"poly-updated\">Loading…</span>\n </div>\n
\ <div class=\"metrics-grid\">\n <div class=\"metric\">\n <div
class=\"metric-label\">P&amp;L</div>\n <div class=\"metric-value loading\"
id=\"m-pnl\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Win Rate</div>\n <div class=\"metric-value loading\"
id=\"m-winrate\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Deployed</div>\n <div class=\"metric-value loading\"
id=\"m-deployed\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Trades</div>\n <div class=\"metric-value loading\"
id=\"m-trades\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Bankroll</div>\n <div class=\"metric-value loading\"
id=\"m-bankroll\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Sharpe</div>\n <div class=\"metric-value loading\"
id=\"m-sharpe\">—</div>\n </div>\n <div class=\"metric\">\n <div
class=\"metric-label\">Calibration</div>\n <div class=\"metric-value
loading\" id=\"m-calibration\">—</div>\n </div>\n <div class=\"metric\">\n
\ <div class=\"metric-label\">Status</div>\n <div class=\"metric-value
loading\" id=\"m-status\">—</div>\n </div>\n </div>\n </div>\n
\ </div>\n\n <footer>\n <p>\n Hosted on <strong>k3s</strong> &mdash;\n
\ <a href=\"https://grafana.chemavx.xyz/d/chemavx-homelab-v1/chemavx-homelab-overview\"
target=\"_blank\">Cluster Dashboard</a>\n &mdash; <a href=\"https://git.chemavx.xyz\"
target=\"_blank\">Gitea</a>\n </p>\n </footer>\n\n <script>\n const API
= 'https://polymarket.chemavx.xyz/api/summary';\n const fmt$ = v => v == null
? '—' : '$' + v.toFixed(2);\n const fmtPct = v => v == null ? '—' : (v * 100).toFixed(1)
+ '%';\n const fmtN = v => v == null ? '—' : String(v);\n const fmtF =
(v, d=3) => v == null ? '—' : v.toFixed(d);\n\n function colorClass(id, val)
{\n const el = document.getElementById(id);\n el.classList.remove('positive','negative','neutral','loading');\n
\ if (val > 0) el.classList.add('positive');\n else if (val < 0) el.classList.add('negative');\n
\ else el.classList.add('neutral');\n }\n\n async function fetchMetrics()
{\n try {\n const r = await fetch(API, { cache: 'no-store' });\n if
(!r.ok) throw new Error(r.status);\n const d = await r.json();\n\n document.getElementById('m-pnl').textContent
\ = fmt$(d.total_pnl);\n document.getElementById('m-winrate').textContent
\ = fmtPct(d.win_rate);\n document.getElementById('m-deployed').textContent
\ = fmt$(d.total_deployed);\n document.getElementById('m-trades').textContent
\ = fmtN(d.total_trades);\n document.getElementById('m-bankroll').textContent
\ = fmt$(d.paper_bankroll);\n document.getElementById('m-sharpe').textContent
\ = fmtF(d.sharpe_ratio, 2);\n document.getElementById('m-calibration').textContent
= fmtF(d.calibration_score, 3);\n document.getElementById('m-status').textContent
\ = d.promotion_ready ? '\U0001F680 Ready' : '⏳ Training';\n\n colorClass('m-pnl',
d.total_pnl);\n colorClass('m-sharpe', d.sharpe_ratio);\n\n const
mode = d.paper_mode ? 'PAPER' : 'LIVE';\n const badge = document.getElementById('poly-mode');\n
\ badge.textContent = mode;\n badge.style.background = d.paper_mode\n
\ ? 'rgba(188,140,255,0.15)' : 'rgba(63,185,80,0.15)';\n badge.style.color
= d.paper_mode ? 'var(--purple)' : 'var(--green)';\n badge.style.borderColor
= d.paper_mode\n ? 'rgba(188,140,255,0.3)' : 'rgba(63,185,80,0.3)';\n\n
\ const now = new Date();\n document.getElementById('poly-updated').textContent
=\n 'Updated ' + now.toLocaleTimeString();\n } catch (e) {\n document.getElementById('poly-updated').textContent
= 'Error: ' + e.message;\n }\n }\n\n fetchMetrics();\n setInterval(fetchMetrics,
30000);\n </script>\n</body>\n</html>\n"
kind: ConfigMap
metadata:
name: portfolio-html
namespace: portfolio
data:
index.html: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ChemaVX</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0d1117;
--surface: #161b22;
--border: #30363d;
--text: #e6edf3;
--muted: #8b949e;
--accent: #58a6ff;
--green: #3fb950;
--red: #f85149;
--yellow: #d29922;
--purple: #bc8cff;
}
body {
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 3rem 1.5rem 4rem;
}
/* ── Header ─────────────────────────────────── */
header {
text-align: center;
margin-bottom: 3.5rem;
}
.avatar {
width: 80px; height: 80px;
border-radius: 50%;
background: linear-gradient(135deg, #1f6feb 0%, #bc8cff 100%);
display: flex; align-items: center; justify-content: center;
font-size: 2rem; font-weight: 700; color: #fff;
margin: 0 auto 1.25rem;
box-shadow: 0 0 0 3px var(--border);
}
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.tagline {
color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem;
}
.dot { display: inline-block; width: 8px; height: 8px;
border-radius: 50%; background: var(--green);
margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
/* ── Section title ───────────────────────────── */
.section-title {
font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
text-transform: uppercase; color: var(--muted);
margin-bottom: 0.875rem;
}
/* ── Services grid ───────────────────────────── */
.services-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 0.75rem;
width: 100%; max-width: 720px;
margin-bottom: 2.5rem;
}
.service-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1rem 1.1rem;
text-decoration: none;
color: var(--text);
transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
display: flex; align-items: center; gap: 0.65rem;
}
.service-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(88,166,255,0.1);
}
.service-icon { font-size: 1.3rem; flex-shrink: 0; }
.service-name { font-size: 0.9rem; font-weight: 500; }
/* ── Polymarket card ─────────────────────────── */
.poly-wrapper { width: 100%; max-width: 720px; }
.poly-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 2.5rem;
}
.poly-header {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 1.25rem;
}
.poly-title {
display: flex; align-items: center; gap: 0.5rem;
font-size: 0.95rem; font-weight: 600;
}
.poly-badge {
font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em;
padding: 2px 7px; border-radius: 20px;
background: rgba(188,140,255,0.15); color: var(--purple);
border: 1px solid rgba(188,140,255,0.3);
}
#poly-updated {
font-size: 0.72rem; color: var(--muted);
}
.metrics-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.75rem;
}
@media (min-width: 480px) {
.metrics-grid { grid-template-columns: repeat(4, 1fr); }
}
.metric {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.875rem 1rem;
}
.metric-label {
font-size: 0.68rem; color: var(--muted);
text-transform: uppercase; letter-spacing: 0.06em;
margin-bottom: 0.35rem;
}
.metric-value {
font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums;
transition: color 0.3s;
}
.metric-value.positive { color: var(--green); }
.metric-value.negative { color: var(--red); }
.metric-value.neutral { color: var(--text); }
.metric-value.loading { color: var(--muted); font-size: 1rem; }
/* ── Footer ──────────────────────────────────── */
footer {
color: var(--muted); font-size: 0.75rem; text-align: center;
width: 100%; max-width: 720px;
border-top: 1px solid var(--border);
padding-top: 1.25rem;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
</style>
</head>
<body>
<header>
<div class="avatar">C</div>
<h1>ChemaVX</h1>
<p class="tagline">
<span class="dot"></span>Homelab · k3s · Self-hosted
</p>
</header>
<!-- Services -->
<div style="width:100%;max-width:720px;margin-bottom:2.5rem;">
<p class="section-title">Services</p>
<div class="services-grid">
<a class="service-card" href="https://grafana.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">📊</span>
<span class="service-name">Grafana</span>
</a>
<a class="service-card" href="https://n8n.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">⚙️</span>
<span class="service-name">n8n</span>
</a>
<a class="service-card" href="https://home.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🏠</span>
<span class="service-name">Homarr</span>
</a>
<a class="service-card" href="https://polymarket.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">📈</span>
<span class="service-name">Polymarket Bot</span>
</a>
<a class="service-card" href="https://chat.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🤖</span>
<span class="service-name">Open WebUI</span>
</a>
<a class="service-card" href="https://git.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🐙</span>
<span class="service-name">Gitea</span>
</a>
<a class="service-card" href="https://argocd.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🔄</span>
<span class="service-name">ArgoCD</span>
</a>
<a class="service-card" href="https://vaultwarden.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🔐</span>
<span class="service-name">Vaultwarden</span>
</a>
</div>
</div>
<!-- Polymarket live metrics -->
<div class="poly-wrapper">
<p class="section-title">Polymarket Bot — Live</p>
<div class="poly-card">
<div class="poly-header">
<div class="poly-title">
<span>📈</span>
<span>Portfolio Summary</span>
<span class="poly-badge" id="poly-mode">PAPER</span>
</div>
<span id="poly-updated">Loading…</span>
</div>
<div class="metrics-grid">
<div class="metric">
<div class="metric-label">P&amp;L</div>
<div class="metric-value loading" id="m-pnl">—</div>
</div>
<div class="metric">
<div class="metric-label">Win Rate</div>
<div class="metric-value loading" id="m-winrate">—</div>
</div>
<div class="metric">
<div class="metric-label">Deployed</div>
<div class="metric-value loading" id="m-deployed">—</div>
</div>
<div class="metric">
<div class="metric-label">Trades</div>
<div class="metric-value loading" id="m-trades">—</div>
</div>
<div class="metric">
<div class="metric-label">Bankroll</div>
<div class="metric-value loading" id="m-bankroll">—</div>
</div>
<div class="metric">
<div class="metric-label">Sharpe</div>
<div class="metric-value loading" id="m-sharpe">—</div>
</div>
<div class="metric">
<div class="metric-label">Calibration</div>
<div class="metric-value loading" id="m-calibration">—</div>
</div>
<div class="metric">
<div class="metric-label">Status</div>
<div class="metric-value loading" id="m-status">—</div>
</div>
</div>
</div>
</div>
<footer>
<p>
Hosted on <strong>k3s</strong> &mdash;
<a href="https://grafana.chemavx.xyz/d/chemavx-homelab-v1/chemavx-homelab-overview" target="_blank">Cluster Dashboard</a>
&mdash; <a href="https://git.chemavx.xyz" target="_blank">Gitea</a>
</p>
</footer>
<script>
const API = 'https://polymarket.chemavx.xyz/api/summary';
const fmt$ = v => v == null ? '—' : '$' + v.toFixed(2);
const fmtPct = v => v == null ? '—' : (v * 100).toFixed(1) + '%';
const fmtN = v => v == null ? '—' : String(v);
const fmtF = (v, d=3) => v == null ? '—' : v.toFixed(d);
function colorClass(id, val) {
const el = document.getElementById(id);
el.classList.remove('positive','negative','neutral','loading');
if (val > 0) el.classList.add('positive');
else if (val < 0) el.classList.add('negative');
else el.classList.add('neutral');
}
async function fetchMetrics() {
try {
const r = await fetch(API, { cache: 'no-store' });
if (!r.ok) throw new Error(r.status);
const d = await r.json();
document.getElementById('m-pnl').textContent = fmt$(d.total_pnl);
document.getElementById('m-winrate').textContent = fmtPct(d.win_rate);
document.getElementById('m-deployed').textContent = fmt$(d.total_deployed);
document.getElementById('m-trades').textContent = fmtN(d.total_trades);
document.getElementById('m-bankroll').textContent = fmt$(d.paper_bankroll);
document.getElementById('m-sharpe').textContent = fmtF(d.sharpe_ratio, 2);
document.getElementById('m-calibration').textContent = fmtF(d.calibration_score, 3);
document.getElementById('m-status').textContent = d.promotion_ready ? '🚀 Ready' : '⏳ Training';
colorClass('m-pnl', d.total_pnl);
colorClass('m-sharpe', d.sharpe_ratio);
const mode = d.paper_mode ? 'PAPER' : 'LIVE';
const badge = document.getElementById('poly-mode');
badge.textContent = mode;
badge.style.background = d.paper_mode
? 'rgba(188,140,255,0.15)' : 'rgba(63,185,80,0.15)';
badge.style.color = d.paper_mode ? 'var(--purple)' : 'var(--green)';
badge.style.borderColor = d.paper_mode
? 'rgba(188,140,255,0.3)' : 'rgba(63,185,80,0.3)';
const now = new Date();
document.getElementById('poly-updated').textContent =
'Updated ' + now.toLocaleTimeString();
} catch (e) {
document.getElementById('poly-updated').textContent = 'Error: ' + e.message;
}
}
fetchMetrics();
setInterval(fetchMetrics, 30000);
</script>
</body>
</html>