Files
NexaVPN/public-web/styles.css
nessi ff7eff8242 feat: add public status page with component health monitoring and system metrics visualization
Add statuspage package with service, handler, and types for exposing platform health. Implement GET /api/v1/status endpoint returning operational status, component health (API, database, gateway runtime), and control plane summary counts.

Add Service.Snapshot method querying database connectivity, user/device/gateway/service/policy counts, connected device count via handshake timestamps, and gateway runtime tel
2026-03-24 18:25:55 +01:00

283 lines
4.7 KiB
CSS

:root {
color-scheme: dark;
font-family: "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
--bg: #08111d;
--panel: rgba(15, 24, 41, 0.82);
--text: #eef4ff;
--muted: #a7b7d4;
--line: rgba(177, 197, 229, 0.14);
--accent: #74e0b8;
--accent-strong: #1fb67a;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
color: var(--text);
background:
radial-gradient(circle at top left, rgba(116, 224, 184, 0.17), transparent 25%),
radial-gradient(circle at right, rgba(74, 120, 255, 0.12), transparent 20%),
linear-gradient(180deg, #07101c 0%, #0d1728 100%);
}
.shell {
width: min(960px, 100%);
margin: 0 auto;
min-height: 100vh;
display: grid;
align-content: center;
gap: 24px;
padding: 32px 24px;
}
.hero,
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 28px;
box-shadow: 0 24px 72px rgba(3, 8, 20, 0.34);
backdrop-filter: blur(16px);
}
.hero {
display: grid;
gap: 18px;
padding: 32px;
}
.logo {
width: min(280px, 100%);
height: auto;
}
.eyebrow {
margin: 0;
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.18em;
font-size: 0.78rem;
}
h1,
h2,
p,
ul {
margin: 0;
}
h1 {
font-size: clamp(2rem, 5vw, 3.4rem);
line-height: 1.05;
}
.copy {
max-width: 42rem;
color: var(--muted);
line-height: 1.6;
font-size: 1.05rem;
}
.actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 18px;
border-radius: 999px;
text-decoration: none;
font-weight: 700;
}
.button.primary {
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
color: #04141a;
}
.button.secondary {
border: 1px solid var(--line);
color: var(--text);
background: rgba(255, 255, 255, 0.03);
}
.card {
padding: 24px 28px;
}
.card ul {
padding-left: 20px;
color: var(--muted);
line-height: 1.8;
}
.status-shell {
width: min(1120px, 100%);
}
.status-hero {
gap: 22px;
}
.status-hero-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 18px;
}
.status-pill {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 144px;
padding: 14px 20px;
border-radius: 999px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.04);
color: var(--text);
font-weight: 800;
}
.status-pill.is-loading {
color: var(--muted);
}
.status-pill.is-operational {
background: linear-gradient(135deg, rgba(116, 224, 184, 0.2), rgba(31, 182, 122, 0.18));
border-color: rgba(116, 224, 184, 0.28);
color: var(--accent);
}
.status-pill.is-degraded {
background: linear-gradient(135deg, rgba(255, 164, 121, 0.18), rgba(255, 96, 96, 0.12));
border-color: rgba(255, 140, 140, 0.24);
color: #ffc0c0;
}
.status-grid {
display: grid;
gap: 24px;
grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}
.section-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
margin-bottom: 22px;
}
.section-head h2 {
font-size: 1.45rem;
margin-top: 8px;
}
.meta {
color: var(--muted);
font-size: 0.95rem;
}
.component-list,
.summary-grid {
display: grid;
gap: 14px;
}
.component-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
padding: 18px 20px;
border-radius: 20px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.03);
}
.component-body {
display: grid;
gap: 8px;
}
.component-heading {
font-size: 1.05rem;
font-weight: 700;
}
.component-message {
color: var(--muted);
line-height: 1.55;
}
.component-badge {
flex-shrink: 0;
padding: 8px 12px;
border-radius: 999px;
border: 1px solid var(--line);
font-size: 0.82rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.component-badge.is-operational {
color: var(--accent);
border-color: rgba(116, 224, 184, 0.22);
background: rgba(116, 224, 184, 0.08);
}
.component-badge.is-degraded {
color: #ffc0c0;
border-color: rgba(255, 140, 140, 0.22);
background: rgba(255, 128, 128, 0.08);
}
.summary-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.summary-tile {
display: grid;
gap: 10px;
padding: 18px 20px;
border-radius: 20px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.03);
}
.summary-label {
color: var(--muted);
font-size: 0.92rem;
}
.summary-value {
font-size: 2rem;
line-height: 1;
}
@media (max-width: 720px) {
.hero,
.card {
padding: 24px;
}
.status-hero-head,
.section-head {
flex-direction: column;
}
.status-grid,
.summary-grid {
grid-template-columns: 1fr;
}
}