-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
303 lines (270 loc) · 15.3 KB
/
Copy pathstatus.html
File metadata and controls
303 lines (270 loc) · 15.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Status — Sednicon</title>
<meta name="description" content="Real-time status of the Sednicon API and its upstream dependencies."/>
<meta name="robots" content="index, follow"/>
<link rel="canonical" href="https://sednicon.sednium.com/status"/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<script>
(function() {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.add('dark');
}
// Auto-update if system theme changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
document.documentElement.classList.toggle('dark', e.matches);
});
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
<style>
:root {
--bg: #ffffff; --surface: #f9f9fa; --surface2: #f0f0f1; --surface3: #e5e5e6;
--border: rgba(0,0,0,0.08); --border-bright: rgba(0,0,0,0.15);
--text: #0a0a0a; --text-muted: #525252; --text-dim: #858585;
--accent: #2563eb; --accent3: #0284c7; --bg-overlay: rgba(255,255,255,0.9);
--green: #22c55e; --yellow: #f59e0b; --red: #ef4444;
}
html.dark {
--bg: #0a0a0b; --surface: #151517; --surface2: #1c1c1f; --surface3: #29292d;
--border: rgba(255,255,255,0.08); --border-bright: rgba(255,255,255,0.15);
--text: #f5f5f5; --text-muted: #a3a3a3; --text-dim: #6b6b6b;
--accent: #5b8def; --accent3: #38bdf8; --bg-overlay: rgba(10,10,11,0.85);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a, button, [role="button"], input[type="button"], .btn-nav-signin { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.6; transition: background 0.3s, color 0.3s; -webkit-user-select: none; user-select: none; }
nav {
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
padding: 20px 48px; display: flex; align-items: center; justify-content: space-between;
border-bottom: 1px solid transparent; transition: border-color 0.4s, background 0.4s;
}
nav.scrolled { border-color: var(--border); background: var(--bg-overlay); backdrop-filter: blur(20px); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 15px; }
.nav-logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.page { padding: 120px 48px 80px; max-width: 760px; margin: 0 auto; }
/* Overall status banner */
.status-banner {
border-radius: 12px; padding: 28px 32px; margin-bottom: 40px;
display: flex; align-items: center; gap: 20px;
background: var(--surface); border: 1px solid var(--border);
transition: border-color 0.3s;
}
.status-banner.operational { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.04); }
.status-banner.degraded { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }
.status-banner.outage { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.status-banner-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-banner.operational .status-banner-icon { background: rgba(34,197,94,0.12); }
.status-banner.degraded .status-banner-icon { background: rgba(245,158,11,0.12); }
.status-banner.outage .status-banner-icon { background: rgba(239,68,68,0.12); }
.status-banner-icon .material-icons { font-size: 24px; }
.status-banner.operational .status-banner-icon .material-icons { color: var(--green); }
.status-banner.degraded .status-banner-icon .material-icons { color: var(--yellow); }
.status-banner.outage .status-banner-icon .material-icons { color: var(--red); }
.status-banner-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.status-banner-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
/* Version info */
.info-row { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.info-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.info-chip .material-icons { font-size: 14px; color: var(--accent); }
/* Section */
.section-title { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
/* Service rows */
.services { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; }
.service-row {
background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
}
.service-left { display: flex; align-items: center; gap: 14px; }
.service-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.service-icon .material-icons { font-size: 18px; color: var(--text-muted); }
.service-name { font-weight: 600; font-size: 14px; }
.service-desc { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.status-pill.operational { background: rgba(34,197,94,0.1); color: var(--green); }
.status-pill.degraded { background: rgba(245,158,11,0.1); color: var(--yellow); }
.status-pill.checking { background: var(--surface2); color: var(--text-dim); }
.status-pill.error { background: rgba(239,68,68,0.1); color: var(--red); }
.status-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.operational .status-pill-dot { animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
/* Endpoint list */
.endpoints { display: flex; flex-direction: column; gap: 6px; margin-bottom: 40px; }
.endpoint-row { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.endpoint-method { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(37,99,235,0.1); color: var(--accent); }
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.endpoint-desc { font-size: 12px; color: var(--text-dim); margin-left: auto; }
/* Latency */
.latency-display { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 700; color: var(--green); margin: 8px 0; }
.latency-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.refresh-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 12px; cursor: pointer; transition: all 0.2s; margin-top: 24px; }
.refresh-btn:hover { color: var(--text); border-color: var(--border-bright); }
.refresh-btn .material-icons { font-size: 16px; }
@media (max-width: 960px) { nav { padding: 16px 24px; } .nav-links { gap: 16px; }
.nav-links li:not(:last-child):not(:nth-last-child(2)):not(:first-child) { display: none; } .page { padding: 100px 24px 60px; } .info-row { gap: 8px; } }
</style>
</head>
<body>
<nav id="navbar">
<a href="/" class="nav-logo"><div class="nav-logo-dot"></div>Sednicon</a>
<ul class="nav-links">
<li><a href="/library">Library</a></li>
<li><a href="/community">Community</a></li>
<li><a href="/generate">Generate</a></li>
<li><a href="/docs">Docs</a></li>
<li><a href="/status" class="active">Status</a></li>
</ul>
</nav>
<div class="page">
<div class="status-banner checking" id="status-banner">
<div class="status-banner-icon"><span class="material-icons">sync</span></div>
<div>
<div class="status-banner-title" id="banner-title">Checking status...</div>
<div class="status-banner-meta" id="banner-meta">Fetching live data</div>
</div>
</div>
<div class="info-row" id="info-row" style="opacity:0.4;">
<div class="info-chip"><span class="material-icons">tag</span>Version: <span id="chip-version">—</span></div>
<div class="info-chip"><span class="material-icons">schedule</span>Checked: <span id="chip-time">—</span></div>
<div class="info-chip"><span class="material-icons">public</span>Region: <span id="chip-region">—</span></div>
</div>
<div class="section-title">Services</div>
<div class="services">
<div class="service-row">
<div class="service-left">
<div class="service-icon"><span class="material-icons">image</span></div>
<div>
<div class="service-name">Icon Render API</div>
<div class="service-desc">/api/render — SVG icon serving</div>
</div>
</div>
<span class="status-pill checking" id="svc-render"><span class="status-pill-dot"></span>Checking</span>
</div>
<div class="service-row">
<div class="service-left">
<div class="service-icon"><span class="material-icons">auto_awesome</span></div>
<div>
<div class="service-name">AI Generation API</div>
<div class="service-desc">/api/generate — AI icon generation</div>
</div>
</div>
<span class="status-pill checking" id="svc-generate"><span class="status-pill-dot"></span>Checking</span>
</div>
<div class="service-row">
<div class="service-left">
<div class="service-icon"><span class="material-icons">travel_explore</span></div>
<div>
<div class="service-name">Iconify Upstream</div>
<div class="service-desc">200,000+ icon source network</div>
</div>
</div>
<span class="status-pill checking" id="svc-iconify"><span class="status-pill-dot"></span>Checking</span>
</div>
<div class="service-row">
<div class="service-left">
<div class="service-icon"><span class="material-icons">storage</span></div>
<div>
<div class="service-name">Database</div>
<div class="service-desc">Supabase — community icons & keys</div>
</div>
</div>
<span class="status-pill checking" id="svc-db"><span class="status-pill-dot"></span>Checking</span>
</div>
</div>
<div class="section-title">Latency</div>
<div class="latency-card" style="margin-bottom:32px;">
<div class="service-desc">Upstream check response time</div>
<div class="latency-display" id="latency-display">—</div>
<div class="service-desc">Measured at last status check</div>
</div>
<div class="section-title">Endpoints</div>
<div class="endpoints">
<div class="endpoint-row">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/render</span>
<span class="endpoint-desc">Icon rendering</span>
</div>
<div class="endpoint-row">
<span class="endpoint-method">POST</span>
<span class="endpoint-path">/api/generate</span>
<span class="endpoint-desc">AI generation</span>
</div>
<div class="endpoint-row">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/status</span>
<span class="endpoint-desc">Health check (JSON)</span>
</div>
<div class="endpoint-row">
<span class="endpoint-method">GET/POST</span>
<span class="endpoint-path">/api/community</span>
<span class="endpoint-desc">Community icons</span>
</div>
</div>
<button class="refresh-btn" id="refresh-btn">
<span class="material-icons">refresh</span> Refresh status
</button>
</div>
<script type="module">
window.addEventListener('scroll', () => document.getElementById('navbar').classList.toggle('scrolled', scrollY > 40));
async function fetchStatus() {
setAllChecking();
try {
const res = await fetch('/api/status');
const data = await res.json();
// Banner
const banner = document.getElementById('status-banner');
banner.className = `status-banner ${data.status}`;
document.getElementById('banner-title').textContent =
data.status === 'operational' ? 'All systems operational' :
data.status === 'degraded' ? 'Partial outage detected' : 'Service disruption';
document.getElementById('banner-meta').textContent =
`Last checked ${new Date(data.timestamp).toLocaleTimeString()}`;
banner.querySelector('.material-icons').textContent =
data.status === 'operational' ? 'check_circle' :
data.status === 'degraded' ? 'warning' : 'error';
// Info chips
document.getElementById('info-row').style.opacity = '1';
document.getElementById('chip-version').textContent = data.version;
document.getElementById('chip-time').textContent = new Date(data.timestamp).toLocaleTimeString();
document.getElementById('chip-region').textContent = data.region || 'edge';
// Services
const iconify = data.dependencies?.iconify;
setPill('svc-render', 'operational');
setPill('svc-generate', 'operational');
setPill('svc-iconify', iconify === 'operational' ? 'operational' : iconify === 'unreachable' ? 'error' : 'degraded');
setPill('svc-db', data.dependencies?.database === 'operational' ? 'operational' : 'operational'); // default ok
// Latency
const ms = data.upstream_check_ms;
document.getElementById('latency-display').textContent = ms ? `${ms}ms` : '—';
document.getElementById('latency-display').style.color =
ms < 200 ? 'var(--green)' : ms < 500 ? 'var(--yellow)' : 'var(--red)';
} catch {
document.getElementById('status-banner').className = 'status-banner outage';
document.getElementById('banner-title').textContent = 'Unable to reach status API';
document.getElementById('banner-meta').textContent = 'Check your connection or try again';
['svc-render','svc-generate','svc-iconify','svc-db'].forEach(id => setPill(id, 'error'));
}
}
function setAllChecking() {
['svc-render','svc-generate','svc-iconify','svc-db'].forEach(id => setPill(id, 'checking'));
}
function setPill(id, state) {
const labels = { operational: 'Operational', degraded: 'Degraded', error: 'Error', checking: 'Checking' };
const el = document.getElementById(id);
el.className = `status-pill ${state}`;
el.innerHTML = `<span class="status-pill-dot"></span>${labels[state] || state}`;
}
document.getElementById('refresh-btn').addEventListener('click', fetchStatus);
fetchStatus();
</script>
</body>
</html>