Files
DataStack/Design-Files/DataStack — Settings-pages.html
i vib fcc4f4db2d chore: publish current DataStack updates
Publish the current application, design, and Phase 1 deployment updates. Excludes ignored personal notes, local MCP config, and generated TypeScript build info.
2026-10-23 19:56:38 -07:00

714 lines
33 KiB
HTML

<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DataStack — Settings</title>
<style>
:root{
--bg:#0a0a0b;--surface:#111113;--surface-2:#17171a;--surface-3:#1d1d21;
--border:#232326;--border-strong:#2e2e33;
--text:#e8e8ea;--text-muted:#85858c;--text-faint:#5a5a62;
--accent:#a3e635;--accent-text:#a3e635;
--danger:#f87171;--warn:#fbbf24;
--font:"Segoe UI","Segoe UI Web",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
--mono:"Consolas","SF Mono","Courier New",monospace;
--radius:0;
}
[data-theme="light"]{
--bg:#fafafa;--surface:#fff;--surface-2:#f4f4f5;--surface-3:#ececed;
--border:#e2e2e5;--border-strong:#d0d0d3;
--text:#111113;--text-muted:#5a5a62;--text-faint:#85858c;
--accent:#65a30d;--accent-text:#4d7c0f;
--danger:#dc2626;--warn:#d97706;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--text);font-family:var(--font);
font-size:13px;line-height:1.5;font-weight:400;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer}
.icon{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5;
stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-sm{width:14px;height:14px}
/* Layout */
.admin{display:grid;grid-template-columns:208px 1fr;min-height:100vh}
.sidebar{background:var(--surface);border-right:1px solid var(--border);
display:flex;flex-direction:column;height:100vh;position:sticky;top:0;z-index:40}
.sidebar-head{height:56px;padding:0 16px;display:flex;align-items:center;
justify-content:space-between;border-bottom:1px solid var(--border);flex-shrink:0}
.brand{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:500}
.brand-mark{width:14px;height:14px;background:var(--accent);display:grid;place-items:center}
.brand-mark::after{content:"";width:5px;height:5px;background:var(--bg)}
.brand-tag{font-size:9px;padding:1px 5px;margin-left:6px;
border:1px solid var(--border-strong);color:var(--text-faint);letter-spacing:.5px}
.sidebar-nav{flex:1;overflow-y:auto;padding:12px 0}
.nav-section{padding:0 12px;margin-bottom:16px}
.nav-label{font-size:10px;text-transform:uppercase;letter-spacing:.8px;
color:var(--text-faint);padding:4px 8px 6px;display:flex;align-items:center;
justify-content:space-between}
.nav-label .count{background:var(--surface-2);color:var(--text-muted);padding:0 5px;
font-size:9px;letter-spacing:0}
.nav-item{display:flex;align-items:center;gap:10px;padding:7px 8px;height:32px;
font-size:12.5px;color:var(--text-muted);border-left:2px solid transparent;
transition:background .12s,color .12s;user-select:none}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{background:var(--surface-2);color:var(--text);border-left-color:var(--accent)}
.nav-item.active .icon{color:var(--accent)}
.sidebar-foot{border-top:1px solid var(--border);padding:10px 12px;
display:flex;align-items:center;gap:8px}
.avatar{width:26px;height:26px;background:var(--surface-3);border:1px solid var(--border-strong);
display:grid;place-items:center;font-size:11px;font-weight:500;color:var(--text);flex-shrink:0}
.user-meta{flex:1;min-width:0}
.user-name{font-size:12px;font-weight:500;color:var(--text);white-space:nowrap;
overflow:hidden;text-overflow:ellipsis}
.user-role{font-size:10px;color:var(--text-faint);text-transform:uppercase;letter-spacing:.5px}
.icon-btn{width:28px;height:28px;background:transparent;border:1px solid var(--border);
display:grid;place-items:center;color:var(--text-muted);transition:background .12s}
.icon-btn:hover{background:var(--surface-2);color:var(--text)}
/* Main */
.admin-main{display:flex;flex-direction:column;min-width:0}
.topbar{height:56px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--border);
display:flex;align-items:center;justify-content:space-between;gap:16px;
position:sticky;top:0;z-index:30}
.topbar-left{display:flex;align-items:center;gap:12px;min-width:0}
.menu-btn{display:none}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-faint)}
.breadcrumb .sep{color:var(--border-strong)}
.breadcrumb .current{color:var(--text)}
.topbar-right{display:flex;align-items:center;gap:8px}
.theme-toggle{width:28px;height:28px;background:transparent;border:1px solid var(--border);
display:grid;place-items:center;color:var(--text-muted)}
.theme-toggle:hover{background:var(--surface-2)}
/* Content */
.content{padding:24px;max-width:1080px;width:100%}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
margin-bottom:16px;flex-wrap:wrap}
.page-title{font-size:17px;font-weight:500;letter-spacing:-.2px}
.page-sub{font-size:12px;color:var(--text-muted);margin-top:2px}
.page-actions{display:flex;gap:8px}
.btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;height:30px;
font-size:12px;font-weight:400;border:1px solid var(--border-strong);
background:transparent;color:var(--text);transition:background .12s,border-color .12s}
.btn:hover{background:var(--surface-2)}
.btn-primary{background:var(--text);color:var(--bg);border-color:var(--text)}
.btn-primary:hover{background:#d0d0d3;border-color:#d0d0d3}
.btn-danger{color:var(--danger);border-color:var(--border)}
.btn-danger:hover{background:rgba(248,113,113,.08);border-color:var(--danger)}
.btn-sm{padding:4px 9px;height:26px;font-size:11px}
/* Tabs */
.tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:0;
overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{padding:9px 14px;font-size:12px;color:var(--text-muted);border-bottom:2px solid transparent;
margin-bottom:-1px;background:transparent;border-top:none;border-left:none;border-right:none;
cursor:pointer;white-space:nowrap;transition:color .12s,border-color .12s}
.tab:hover{color:var(--text)}
.tab.active{color:var(--text);border-bottom-color:var(--accent)}
.tab .tab-count{font-size:10px;color:var(--text-faint);margin-left:5px}
/* Panel */
.panel{background:var(--surface);border:1px solid var(--border);border-top:none}
.tab-content{display:none}
.tab-content.active{display:block}
.section{padding:16px}
.section + .section{border-top:1px solid var(--border)}
.section-title{font-size:10px;text-transform:uppercase;letter-spacing:.8px;
color:var(--text-faint);margin-bottom:12px;display:flex;align-items:center;gap:6px}
.section-title .section-desc{text-transform:none;letter-spacing:0;font-size:11px;
color:var(--text-faint);margin-left:auto}
/* Field row */
.field{display:grid;grid-template-columns:220px 1fr;gap:20px;padding:8px 0;
align-items:start}
.field:first-of-type{padding-top:0}
.field:last-of-type{padding-bottom:0}
.field-label-wrap{min-width:0;padding-top:1px}
.field-label{font-size:12.5px;color:var(--text);font-weight:400;line-height:1.4}
.field-hint{font-size:11px;color:var(--text-faint);margin-top:2px;line-height:1.5}
.field-control{min-width:0}
.field-control input,
.field-control select,
.field-control textarea{
width:100%;height:30px;padding:0 10px;
background:var(--bg);border:1px solid var(--border);
outline:none;font-size:12.5px;color:var(--text);
transition:border-color .12s,background .12s;
}
.field-control textarea{height:auto;padding:8px 10px;font-family:var(--mono);font-size:11.5px;
resize:vertical;min-height:60px;line-height:1.5}
.field-control input::placeholder,
.field-control textarea::placeholder{color:var(--text-faint)}
.field-control input:focus,
.field-control select:focus,
.field-control textarea:focus{border-color:var(--border-strong)}
.field-control input[readonly]{background:var(--surface-2);color:var(--text-muted);cursor:default}
.field-control select{appearance:none;cursor:pointer;
background-image:linear-gradient(45deg,transparent 50%,var(--text-muted) 50%),
linear-gradient(135deg,var(--text-muted) 50%,transparent 50%);
background-position:calc(100% - 10px) 12px,calc(100% - 6px) 12px;
background-size:4px 4px;background-repeat:no-repeat;
padding-right:24px}
/* Inline group (input + button) */
.control-group{display:flex;gap:6px;align-items:stretch}
.control-group input{flex:1;min-width:0}
.control-group .btn{height:30px;flex-shrink:0}
.control-suffix{display:flex;align-items:center;padding:0 10px;height:30px;
border:1px solid var(--border);border-left:none;
background:var(--surface-2);color:var(--text-muted);font-size:11.5px}
/* Mono input for secrets */
.mono-input{font-family:var(--mono);font-size:11.5px}
/* Checkbox inline */
.check{display:flex;align-items:center;gap:8px;font-size:12px;
color:var(--text-muted);cursor:pointer;user-select:none;padding:4px 0}
.check input{display:none}
.check-box{width:14px;height:14px;border:1px solid var(--border-strong);
flex-shrink:0;position:relative;transition:background .12s,border-color .12s}
.check-box::after{content:"";position:absolute;left:4px;top:2px;width:5px;height:8px;
border-right:1.5px solid var(--bg);border-bottom:1.5px solid var(--bg);
transform:rotate(45deg);opacity:0}
.check input:checked + .check-box{background:var(--accent);border-color:var(--accent)}
.check input:checked + .check-box::after{opacity:1}
/* Danger zone */
.danger-zone{border:1px solid var(--danger);padding:12px 16px;
display:flex;align-items:center;justify-content:space-between;gap:12px;
margin-top:8px}
.danger-zone .dz-title{font-size:12.5px;font-weight:500;color:var(--text);margin-bottom:2px}
.danger-zone .dz-desc{font-size:11px;color:var(--text-faint);line-height:1.5}
/* Save bar */
.save-bar{display:flex;align-items:center;gap:8px;padding:10px 16px;
border-top:1px solid var(--border);background:var(--surface)}
.save-status{flex:1;font-size:11.5px;color:var(--text-muted);
display:flex;align-items:center;gap:6px}
.save-status .dot{width:6px;height:6px;background:var(--accent)}
.save-status.dirty .dot{background:var(--warn)}
/* Hint */
.hint{font-size:11px;color:var(--text-faint);margin-top:12px;
display:flex;align-items:center;gap:6px}
/* Mobile */
.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:35}
.overlay.open{display:block}
@media (max-width:1024px){
.admin{grid-template-columns:1fr}
.sidebar{position:fixed;top:0;left:0;width:220px;transform:translateX(-100%);
transition:transform .2s ease-out}
.sidebar.open{transform:translateX(0)}
.menu-btn{display:grid}
}
@media (max-width:720px){
.field{grid-template-columns:1fr;gap:6px}
.content{padding:16px}
.topbar{padding:0 16px}
.breadcrumb .sep,.breadcrumb .root{display:none}
.section{padding:14px}
}
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute">
<symbol id="i-grid" viewBox="0 0 16 16"><rect x="2.5" y="2.5" width="4.5" height="4.5"/><rect x="9" y="2.5" width="4.5" height="4.5"/><rect x="2.5" y="9" width="4.5" height="4.5"/><rect x="9" y="9" width="4.5" height="4.5"/></symbol>
<symbol id="i-db" viewBox="0 0 16 16"><ellipse cx="8" cy="4" rx="5.5" ry="2"/><path d="M2.5 4v8c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2V4"/><path d="M2.5 8c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2"/></symbol>
<symbol id="i-users" viewBox="0 0 16 16"><circle cx="6" cy="6" r="2.5"/><path d="M1.5 13.5c0-2.2 2-3.5 4.5-3.5s4.5 1.3 4.5 3.5"/><path d="M11 3.5a2.5 2.5 0 0 1 0 5"/><path d="M12.5 10c1.4.4 2.5 1.4 2.5 3.5"/></symbol>
<symbol id="i-download" viewBox="0 0 16 16"><path d="M8 2v8"/><path d="M4.5 6.5 8 10l3.5-3.5"/><path d="M2.5 13.5h11"/></symbol>
<symbol id="i-settings" viewBox="0 0 16 16"><circle cx="8" cy="8" r="2.2"/><path d="M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"/></symbol>
<symbol id="i-list" viewBox="0 0 16 16"><path d="M3 4h10M3 8h10M3 12h7"/></symbol>
<symbol id="i-book" viewBox="0 0 16 16"><path d="M3 2.5h7.5c1 0 1.5.5 1.5 1.5v10H4.5c-1 0-1.5-.5-1.5-1.5V2.5Z"/><path d="M3 12.5c0-1 .5-1.5 1.5-1.5H12"/></symbol>
<symbol id="i-menu" viewBox="0 0 16 16"><path d="M2.5 4h11M2.5 8h11M2.5 12h11"/></symbol>
<symbol id="i-sun" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.5 3.5l1 1M11.5 11.5l1 1M3.5 12.5l1-1M11.5 4.5l1-1"/></symbol>
<symbol id="i-moon" viewBox="0 0 16 16"><path d="M13.5 10A6 6 0 1 1 6 2.5c-.3 0-.5 0-.7.1a5.5 5.5 0 0 0 8.2 7.4Z"/></symbol>
<symbol id="i-bell" viewBox="0 0 16 16"><path d="M4 11V7a4 4 0 0 1 8 0v4l1 1.5H3L4 11Z"/><path d="M6.5 13.5a1.5 1.5 0 0 0 3 0"/></symbol>
<symbol id="i-copy" viewBox="0 0 16 16"><rect x="5" y="5" width="8" height="9"/><path d="M3 11V3h8"/></symbol>
<symbol id="i-refresh" viewBox="0 0 16 16"><path d="M13.5 8a5.5 5.5 0 1 1-1.6-3.9"/><path d="M13.5 2.5v3.5H10"/></symbol>
<symbol id="i-eye" viewBox="0 0 16 16"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8Z"/><circle cx="8" cy="8" r="2"/></symbol>
<symbol id="i-trash" viewBox="0 0 16 16"><path d="M3 4h10"/><path d="M5 4V2.5h6V4"/><path d="M4 4l.7 9.5h6.6L12 4"/><path d="M6.5 7v4M9.5 7v4"/></symbol>
<symbol id="i-info" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M8 7.5v4"/><circle cx="8" cy="5" r=".5" fill="currentColor"/></symbol>
<symbol id="i-check" viewBox="0 0 16 16"><path d="M3 8l3.5 3.5L13 5"/></symbol>
</svg>
<div class="admin">
<aside class="sidebar" id="sidebar">
<div class="sidebar-head">
<a href="/" class="brand"><span class="brand-mark"></span>DataStack<span class="brand-tag">CONSOLE</span></a>
</div>
<nav class="sidebar-nav">
<div class="nav-section">
<div class="nav-label">Main</div>
<a href="/vcon/dashboard" class="nav-item"><svg class="icon"><use href="#i-grid"/></svg>Dashboard</a>
<a href="/vcon/data" class="nav-item"><svg class="icon"><use href="#i-db"/></svg>Data</a>
<a href="/vcon/clients" class="nav-item"><svg class="icon"><use href="#i-users"/></svg>Clients</a>
<a href="/vcon/export" class="nav-item"><svg class="icon"><use href="#i-download"/></svg>Export</a>
</div>
<div class="nav-section">
<div class="nav-label">System <span class="count">3</span></div>
<a href="/vcon/logs" class="nav-item"><svg class="icon"><use href="#i-list"/></svg>Logs</a>
<a href="/vcon/settings" class="nav-item active"><svg class="icon"><use href="#i-settings"/></svg>Settings</a>
<a href="/docs" class="nav-item"><svg class="icon"><use href="#i-book"/></svg>Docs</a>
</div>
</nav>
<div class="sidebar-foot">
<div class="avatar">A</div>
<div class="user-meta">
<div class="user-name">Admin</div>
<div class="user-role">Owner</div>
</div>
<button class="icon-btn" title="Settings"><svg class="icon icon-sm"><use href="#i-settings"/></svg></button>
</div>
</aside>
<div class="overlay" id="overlay" onclick="toggleSidebar()"></div>
<main class="admin-main">
<header class="topbar">
<div class="topbar-left">
<button class="icon-btn menu-btn" onclick="toggleSidebar()"><svg class="icon icon-sm"><use href="#i-menu"/></svg></button>
<div class="breadcrumb">
<span class="root">Console</span>
<span class="sep">/</span>
<span class="current">Settings</span>
</div>
</div>
<div class="topbar-right">
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme">
<svg class="icon icon-sm" id="theme-icon"><use href="#i-sun"/></svg>
</button>
<button class="icon-btn" title="Notifications"><svg class="icon icon-sm"><use href="#i-bell"/></svg></button>
</div>
</header>
<div class="content">
<div class="page-head">
<div>
<h1 class="page-title">Settings</h1>
<div class="page-sub">Configure your DataStack instance</div>
</div>
</div>
<!-- Tabs -->
<div class="tabs">
<button class="tab active" data-tab="general">General</button>
<button class="tab" data-tab="connections">Connections</button>
<button class="tab" data-tab="storage">Storage</button>
<button class="tab" data-tab="security">Security</button>
<button class="tab" data-tab="notifications">Notifications</button>
</div>
<!-- Panel -->
<div class="panel">
<!-- GENERAL -->
<div class="tab-content active" id="tab-general">
<div class="section">
<div class="section-title">Identity</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Instance name</div>
<div class="field-hint">Shown in dashboard headers and emails</div>
</div>
<div class="field-control">
<input type="text" value="DataStack" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Base URL</div>
<div class="field-hint">Used in SDK setup and export links</div>
</div>
<div class="field-control">
<input type="text" value="https://your-host.com" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Instance ID</div>
<div class="field-hint">Immutable · used in SDK fingerprint</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="text" class="mono-input" value="inst_7d2f9a4c1e8b" readonly />
<button class="btn btn-sm" title="Copy"><svg class="icon icon-sm"><use href="#i-copy"/></svg></button>
</div>
</div>
</div>
</div>
<div class="section">
<div class="section-title">Locale</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Timezone</div>
<div class="field-hint">Applied to dashboard and exports</div>
</div>
<div class="field-control">
<select>
<option>UTC+00:00 — London</option>
<option>UTC+06:00 — Dhaka</option>
<option>UTC+09:00 — Tokyo</option>
<option>UTC-08:00 — Los Angeles</option>
</select>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Date format</div>
</div>
<div class="field-control">
<select>
<option>YYYY-MM-DD (ISO)</option>
<option>DD/MM/YYYY</option>
<option>MM/DD/YYYY</option>
</select>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Language</div>
</div>
<div class="field-control">
<select>
<option>English</option>
<option>বাংলা</option>
</select>
</div>
</div>
</div>
</div>
<!-- CONNECTIONS -->
<div class="tab-content" id="tab-connections">
<div class="section">
<div class="section-title">WebSocket server</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Public WebSocket URL</div>
<div class="field-hint">Clients connect here (behind Nginx)</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="wss://your-host.com:4000" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Socket port</div>
<div class="field-hint">Internal Express process port</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="4000" />
<span class="control-suffix">TCP</span>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Heartbeat interval</div>
<div class="field-hint">Disconnect clients that miss 2 beats</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="25" />
<span class="control-suffix">sec</span>
</div>
</div>
</div>
</div>
<div class="section">
<div class="section-title">Redis</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Redis URL</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="redis://localhost:6379" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Key prefix</div>
<div class="field-hint">Prevents collisions on shared Redis</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="ds:" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Buffer flush</div>
<div class="field-hint">Trigger CSV write on rows or timer</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="500" placeholder="rows" />
<input type="number" class="mono-input" value="2" placeholder="sec" />
</div>
</div>
</div>
</div>
</div>
<!-- STORAGE -->
<div class="tab-content" id="tab-storage">
<div class="section">
<div class="section-title">CSV files</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Root path</div>
<div class="field-hint">Files written at /{clientId}/{date}.csv</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="/var/datastack/storage" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">File rotation</div>
</div>
<div class="field-control">
<select>
<option>Per day</option>
<option>Per size</option>
<option>Per day + size</option>
</select>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Max file size</div>
<div class="field-hint">Rotate file when threshold is hit</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="100" />
<span class="control-suffix">MB</span>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Retention</div>
<div class="field-hint">Older files auto-deleted by worker</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="30" />
<span class="control-suffix">days</span>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Compress completed files</div>
<div class="field-hint">Gzip closed CSV files (saves ~70%)</div>
</div>
<div class="field-control">
<label class="check">
<input type="checkbox" checked>
<span class="check-box"></span>
Enable gzip on rotation
</label>
</div>
</div>
</div>
<div class="section">
<div class="section-title">Schema</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Row format</div>
<div class="field-hint">Fixed for version 1.0</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="clientId, eventId, timestamp, payload" readonly />
</div>
</div>
</div>
</div>
<!-- SECURITY -->
<div class="tab-content" id="tab-security">
<div class="section">
<div class="section-title">Authentication</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">JWT secret</div>
<div class="field-hint">Rotating invalidates all live sessions</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="text" class="mono-input" value="sk_sec_••••••••8f3a" readonly />
<button class="btn btn-sm"><svg class="icon icon-sm"><use href="#i-refresh"/></svg>Rotate</button>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">JWT TTL</div>
<div class="field-hint">Clients re-handshake after expiry</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="24" />
<span class="control-suffix">hours</span>
</div>
</div>
</div>
</div>
<div class="section">
<div class="section-title">Rate limiting</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Events per second</div>
<div class="field-hint">Per-client cap · excess dropped silently</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="100" />
<span class="control-suffix">ev/s</span>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Max payload size</div>
</div>
<div class="field-control">
<div class="control-group">
<input type="number" class="mono-input" value="100" />
<span class="control-suffix">KB</span>
</div>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Allowed origins</div>
<div class="field-hint">Comma-separated · * allows all</div>
</div>
<div class="field-control">
<input type="text" class="mono-input" value="*" />
</div>
</div>
</div>
<div class="section">
<div class="section-title">Danger zone</div>
<div class="danger-zone">
<div>
<div class="dz-title">Delete all collected data</div>
<div class="dz-desc">Permanently removes every CSV file and Redis buffer. Admin config is preserved.</div>
</div>
<button class="btn btn-danger btn-sm"><svg class="icon icon-sm"><use href="#i-trash"/></svg>Delete data</button>
</div>
</div>
</div>
<!-- NOTIFICATIONS -->
<div class="tab-content" id="tab-notifications">
<div class="section">
<div class="section-title">Delivery</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Alert email</div>
<div class="field-hint">Where critical alerts are sent</div>
</div>
<div class="field-control">
<input type="email" value="admin@example.com" />
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Webhook URL</div>
<div class="field-hint">POST JSON on every event below</div>
</div>
<div class="field-control">
<input type="url" class="mono-input" value="https://hooks.example.com/ds" />
</div>
</div>
</div>
<div class="section">
<div class="section-title">Events to notify</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">Client events</div>
</div>
<div class="field-control">
<label class="check"><input type="checkbox" checked><span class="check-box"></span>Client connected</label>
<label class="check"><input type="checkbox" checked><span class="check-box"></span>Client disconnected unexpectedly</label>
<label class="check"><input type="checkbox"><span class="check-box"></span>New client registered</label>
</div>
</div>
<div class="field">
<div class="field-label-wrap">
<div class="field-label">System events</div>
</div>
<div class="field-control">
<label class="check"><input type="checkbox" checked><span class="check-box"></span>Rate limit hit</label>
<label class="check"><input type="checkbox" checked><span class="check-box"></span>CSV write failure</label>
<label class="check"><input type="checkbox"><span class="check-box"></span>Export completed</label>
<label class="check"><input type="checkbox"><span class="check-box"></span>Daily digest at 00:00</label>
</div>
</div>
</div>
</div>
<!-- Save bar -->
<div class="save-bar">
<div class="save-status">
<span class="dot"></span>
All changes saved
</div>
<button class="btn btn-sm">Discard</button>
<button class="btn btn-primary btn-sm">Save changes</button>
</div>
</div>
<div class="hint">
<svg class="icon icon-sm"><use href="#i-info"/></svg>
Some settings require a service restart to take effect — restart via systemctl or Docker
</div>
</div>
</main>
</div>
<script>
function toggleSidebar(){
document.getElementById('sidebar').classList.toggle('open');
document.getElementById('overlay').classList.toggle('open');
}
function toggleTheme(){
const html=document.documentElement, icon=document.getElementById('theme-icon');
const isDark=html.getAttribute('data-theme')==='dark';
html.setAttribute('data-theme',isDark?'light':'dark');
icon.innerHTML='<use href="'+(isDark?'#i-moon':'#i-sun')+'"/>';
}
// Tab switching
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', () => {
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
tab.classList.add('active');
document.getElementById('tab-' + tab.dataset.tab).classList.add('active');
});
});
</script>
</body>
</html>