@uptime.link/statuspage 1.0.74 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +4096 -504
- package/dist_bundle/bundle.js.map +4 -4
- package/dist_ts_web/00_commitinfo_data.js +2 -2
- package/dist_ts_web/elements/index.d.ts +3 -0
- package/dist_ts_web/elements/index.js +6 -1
- package/dist_ts_web/elements/internal/uplinternal-miniheading.d.ts +1 -0
- package/dist_ts_web/elements/internal/uplinternal-miniheading.js +78 -28
- package/dist_ts_web/elements/upl-statuspage-assetsselector.d.ts +14 -0
- package/dist_ts_web/elements/upl-statuspage-assetsselector.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-assetsselector.demo.js +575 -0
- package/dist_ts_web/elements/upl-statuspage-assetsselector.js +605 -43
- package/dist_ts_web/elements/upl-statuspage-footer.d.ts +46 -2
- package/dist_ts_web/elements/upl-statuspage-footer.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-footer.demo.js +679 -0
- package/dist_ts_web/elements/upl-statuspage-footer.js +792 -61
- package/dist_ts_web/elements/upl-statuspage-header.d.ts +5 -1
- package/dist_ts_web/elements/upl-statuspage-header.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-header.demo.js +220 -0
- package/dist_ts_web/elements/upl-statuspage-header.js +313 -86
- package/dist_ts_web/elements/upl-statuspage-incidents.d.ts +22 -4
- package/dist_ts_web/elements/upl-statuspage-incidents.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-incidents.demo.js +1147 -0
- package/dist_ts_web/elements/upl-statuspage-incidents.js +750 -74
- package/dist_ts_web/elements/upl-statuspage-pagetitle.d.ts +15 -0
- package/dist_ts_web/elements/upl-statuspage-pagetitle.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-pagetitle.demo.js +25 -0
- package/dist_ts_web/elements/upl-statuspage-pagetitle.js +148 -0
- package/dist_ts_web/elements/upl-statuspage-statsgrid.d.ts +23 -0
- package/dist_ts_web/elements/upl-statuspage-statsgrid.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-statsgrid.demo.js +295 -0
- package/dist_ts_web/elements/upl-statuspage-statsgrid.js +374 -0
- package/dist_ts_web/elements/upl-statuspage-statusbar.d.ts +4 -0
- package/dist_ts_web/elements/upl-statuspage-statusbar.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-statusbar.demo.js +365 -0
- package/dist_ts_web/elements/upl-statuspage-statusbar.js +357 -44
- package/dist_ts_web/elements/upl-statuspage-statusdetails.d.ts +14 -0
- package/dist_ts_web/elements/upl-statuspage-statusdetails.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-statusdetails.demo.js +706 -0
- package/dist_ts_web/elements/upl-statuspage-statusdetails.js +373 -63
- package/dist_ts_web/elements/upl-statuspage-statusmonth.d.ts +15 -0
- package/dist_ts_web/elements/upl-statuspage-statusmonth.demo.d.ts +1 -0
- package/dist_ts_web/elements/upl-statuspage-statusmonth.demo.js +798 -0
- package/dist_ts_web/elements/upl-statuspage-statusmonth.js +474 -100
- package/dist_ts_web/interfaces/index.d.ts +84 -0
- package/dist_ts_web/interfaces/index.js +4 -0
- package/dist_ts_web/pages/index.d.ts +4 -1
- package/dist_ts_web/pages/index.js +5 -2
- package/dist_ts_web/pages/statuspage-allgreen.d.ts +1 -0
- package/dist_ts_web/pages/statuspage-allgreen.js +386 -0
- package/dist_ts_web/pages/statuspage-demo.d.ts +1 -0
- package/dist_ts_web/pages/statuspage-demo.js +616 -0
- package/dist_ts_web/pages/statuspage-maintenance.d.ts +1 -0
- package/dist_ts_web/pages/statuspage-maintenance.js +544 -0
- package/dist_ts_web/pages/statuspage-outage.d.ts +1 -0
- package/dist_ts_web/pages/statuspage-outage.js +543 -0
- package/dist_ts_web/styles/shared.styles.d.ts +80 -0
- package/dist_ts_web/styles/shared.styles.js +351 -0
- package/dist_watch/bundle.js +51691 -32432
- package/dist_watch/bundle.js.map +4 -4
- package/npmextra.json +9 -3
- package/package.json +19 -19
- package/readme.hints.md +292 -0
- package/readme.md +326 -149
- package/readme.plan.md +261 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/index.ts +6 -0
- package/ts_web/elements/internal/uplinternal-miniheading.ts +24 -17
- package/ts_web/elements/upl-statuspage-assetsselector.demo.ts +607 -0
- package/ts_web/elements/upl-statuspage-assetsselector.ts +526 -18
- package/ts_web/elements/upl-statuspage-footer.demo.ts +744 -0
- package/ts_web/elements/upl-statuspage-footer.ts +608 -30
- package/ts_web/elements/upl-statuspage-header.demo.ts +241 -0
- package/ts_web/elements/upl-statuspage-header.ts +220 -52
- package/ts_web/elements/upl-statuspage-incidents.demo.ts +1216 -0
- package/ts_web/elements/upl-statuspage-incidents.ts +649 -26
- package/ts_web/elements/upl-statuspage-pagetitle.demo.ts +25 -0
- package/ts_web/elements/upl-statuspage-pagetitle.ts +89 -0
- package/ts_web/elements/upl-statuspage-statsgrid.demo.ts +315 -0
- package/ts_web/elements/upl-statuspage-statsgrid.ts +306 -0
- package/ts_web/elements/upl-statuspage-statusbar.demo.ts +393 -0
- package/ts_web/elements/upl-statuspage-statusbar.ts +281 -20
- package/ts_web/elements/upl-statuspage-statusdetails.demo.ts +754 -0
- package/ts_web/elements/upl-statuspage-statusdetails.ts +297 -38
- package/ts_web/elements/upl-statuspage-statusmonth.demo.ts +876 -0
- package/ts_web/elements/upl-statuspage-statusmonth.ts +397 -76
- package/ts_web/interfaces/index.ts +95 -0
- package/ts_web/pages/index.ts +4 -1
- package/ts_web/pages/statuspage-allgreen.ts +412 -0
- package/ts_web/pages/statuspage-demo.ts +653 -0
- package/ts_web/pages/statuspage-maintenance.ts +570 -0
- package/ts_web/pages/statuspage-outage.ts +568 -0
- package/ts_web/styles/shared.styles.ts +367 -0
- package/dist_ts_web/pages/page1.d.ts +0 -1
- package/dist_ts_web/pages/page1.js +0 -11
- package/ts_web/pages/page1.ts +0 -11
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
import { html, cssManager } from "@design.estate/dees-element";
|
|
2
|
+
import type { IServiceStatus, IOverallStatus, IIncidentDetails, IStatusHistoryPoint, IMonthlyUptime } from '../interfaces/index.js';
|
|
3
|
+
|
|
4
|
+
export const statuspageDemo = () => html`
|
|
5
|
+
<style>
|
|
6
|
+
.demo-page-wrapper {
|
|
7
|
+
min-height: 100vh;
|
|
8
|
+
background: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
|
|
9
|
+
}
|
|
10
|
+
.demo-page-wrapper > dees-demowrapper {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 24px;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
|
|
17
|
+
<div class="demo-page-wrapper">
|
|
18
|
+
|
|
19
|
+
<dees-demowrapper
|
|
20
|
+
.runAfterRender=${async (wrapperElement: any) => {
|
|
21
|
+
const header = wrapperElement.querySelector('upl-statuspage-header') as any;
|
|
22
|
+
const pageTitle = wrapperElement.querySelector('upl-statuspage-pagetitle') as any;
|
|
23
|
+
const statusBar = wrapperElement.querySelector('upl-statuspage-statusbar') as any;
|
|
24
|
+
const statsGrid = wrapperElement.querySelector('upl-statuspage-statsgrid') as any;
|
|
25
|
+
const assetsSelector = wrapperElement.querySelector('upl-statuspage-assetsselector') as any;
|
|
26
|
+
const statusDetails = wrapperElement.querySelector('upl-statuspage-statusdetails') as any;
|
|
27
|
+
const statusMonth = wrapperElement.querySelector('upl-statuspage-statusmonth') as any;
|
|
28
|
+
const incidents = wrapperElement.querySelector('upl-statuspage-incidents') as any;
|
|
29
|
+
const footer = wrapperElement.querySelector('upl-statuspage-footer') as any;
|
|
30
|
+
|
|
31
|
+
// Configure Header
|
|
32
|
+
header.pageTitle = 'CloudFlow';
|
|
33
|
+
header.showReportButton = true;
|
|
34
|
+
header.showSubscribeButton = true;
|
|
35
|
+
header.logoUrl = 'https://via.placeholder.com/150x50/2196F3/ffffff?text=CF';
|
|
36
|
+
|
|
37
|
+
// Configure Page Title
|
|
38
|
+
pageTitle.pageTitle = 'Service Status';
|
|
39
|
+
pageTitle.pageSubtitle = 'Current operational status of CloudFlow Infrastructure services';
|
|
40
|
+
|
|
41
|
+
// Configure Overall Status
|
|
42
|
+
statusBar.overallStatus = {
|
|
43
|
+
status: 'degraded',
|
|
44
|
+
message: 'Minor service degradation in EU-West region',
|
|
45
|
+
lastUpdated: Date.now(),
|
|
46
|
+
affectedServices: 3,
|
|
47
|
+
totalServices: 18
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Configure Services
|
|
51
|
+
const services: IServiceStatus[] = [
|
|
52
|
+
// Core Infrastructure
|
|
53
|
+
{
|
|
54
|
+
id: 'api-gateway',
|
|
55
|
+
name: 'api-gateway',
|
|
56
|
+
displayName: 'API Gateway',
|
|
57
|
+
description: 'Main API endpoint for all services',
|
|
58
|
+
currentStatus: 'operational',
|
|
59
|
+
lastChecked: Date.now(),
|
|
60
|
+
uptime30d: 99.95,
|
|
61
|
+
uptime90d: 99.92,
|
|
62
|
+
responseTime: 45,
|
|
63
|
+
category: 'Core Services',
|
|
64
|
+
selected: true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'auth-service',
|
|
68
|
+
name: 'auth-service',
|
|
69
|
+
displayName: 'Authentication Service',
|
|
70
|
+
description: 'User authentication and authorization',
|
|
71
|
+
currentStatus: 'operational',
|
|
72
|
+
lastChecked: Date.now(),
|
|
73
|
+
uptime30d: 99.98,
|
|
74
|
+
uptime90d: 99.95,
|
|
75
|
+
responseTime: 32,
|
|
76
|
+
category: 'Core Services',
|
|
77
|
+
selected: true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'user-dashboard',
|
|
81
|
+
name: 'user-dashboard',
|
|
82
|
+
displayName: 'User Dashboard',
|
|
83
|
+
description: 'Web application dashboard',
|
|
84
|
+
currentStatus: 'operational',
|
|
85
|
+
lastChecked: Date.now(),
|
|
86
|
+
uptime30d: 99.99,
|
|
87
|
+
uptime90d: 99.97,
|
|
88
|
+
responseTime: 128,
|
|
89
|
+
category: 'Web Services',
|
|
90
|
+
selected: true
|
|
91
|
+
},
|
|
92
|
+
// Regional Services - US
|
|
93
|
+
{
|
|
94
|
+
id: 'us-east-compute',
|
|
95
|
+
name: 'us-east-compute',
|
|
96
|
+
displayName: 'US-East Compute',
|
|
97
|
+
description: 'Virtual machine instances',
|
|
98
|
+
currentStatus: 'operational',
|
|
99
|
+
lastChecked: Date.now(),
|
|
100
|
+
uptime30d: 99.94,
|
|
101
|
+
uptime90d: 99.91,
|
|
102
|
+
responseTime: 22,
|
|
103
|
+
category: 'US-East',
|
|
104
|
+
selected: true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'us-east-storage',
|
|
108
|
+
name: 'us-east-storage',
|
|
109
|
+
displayName: 'US-East Storage',
|
|
110
|
+
description: 'Object storage service',
|
|
111
|
+
currentStatus: 'operational',
|
|
112
|
+
lastChecked: Date.now(),
|
|
113
|
+
uptime30d: 100,
|
|
114
|
+
uptime90d: 99.99,
|
|
115
|
+
responseTime: 18,
|
|
116
|
+
category: 'US-East',
|
|
117
|
+
selected: true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'us-east-database',
|
|
121
|
+
name: 'us-east-database',
|
|
122
|
+
displayName: 'US-East Database',
|
|
123
|
+
description: 'Managed database clusters',
|
|
124
|
+
currentStatus: 'operational',
|
|
125
|
+
lastChecked: Date.now(),
|
|
126
|
+
uptime30d: 99.97,
|
|
127
|
+
uptime90d: 99.95,
|
|
128
|
+
responseTime: 14,
|
|
129
|
+
category: 'US-East',
|
|
130
|
+
selected: false
|
|
131
|
+
},
|
|
132
|
+
// Regional Services - EU (Degraded)
|
|
133
|
+
{
|
|
134
|
+
id: 'eu-west-compute',
|
|
135
|
+
name: 'eu-west-compute',
|
|
136
|
+
displayName: 'EU-West Compute',
|
|
137
|
+
description: 'Virtual machine instances',
|
|
138
|
+
currentStatus: 'degraded',
|
|
139
|
+
lastChecked: Date.now(),
|
|
140
|
+
uptime30d: 98.2,
|
|
141
|
+
uptime90d: 99.1,
|
|
142
|
+
responseTime: 145,
|
|
143
|
+
category: 'EU-West',
|
|
144
|
+
selected: true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 'eu-west-storage',
|
|
148
|
+
name: 'eu-west-storage',
|
|
149
|
+
displayName: 'EU-West Storage',
|
|
150
|
+
description: 'Object storage service',
|
|
151
|
+
currentStatus: 'degraded',
|
|
152
|
+
lastChecked: Date.now(),
|
|
153
|
+
uptime30d: 98.5,
|
|
154
|
+
uptime90d: 99.3,
|
|
155
|
+
responseTime: 220,
|
|
156
|
+
category: 'EU-West',
|
|
157
|
+
selected: true
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'eu-west-database',
|
|
161
|
+
name: 'eu-west-database',
|
|
162
|
+
displayName: 'EU-West Database',
|
|
163
|
+
description: 'Managed database clusters',
|
|
164
|
+
currentStatus: 'partial_outage',
|
|
165
|
+
lastChecked: Date.now(),
|
|
166
|
+
uptime30d: 97.8,
|
|
167
|
+
uptime90d: 98.9,
|
|
168
|
+
responseTime: 450,
|
|
169
|
+
category: 'EU-West',
|
|
170
|
+
selected: true
|
|
171
|
+
},
|
|
172
|
+
// Regional Services - Asia
|
|
173
|
+
{
|
|
174
|
+
id: 'ap-south-compute',
|
|
175
|
+
name: 'ap-south-compute',
|
|
176
|
+
displayName: 'Asia-Pacific Compute',
|
|
177
|
+
description: 'Virtual machine instances',
|
|
178
|
+
currentStatus: 'operational',
|
|
179
|
+
lastChecked: Date.now(),
|
|
180
|
+
uptime30d: 99.91,
|
|
181
|
+
uptime90d: 99.88,
|
|
182
|
+
responseTime: 38,
|
|
183
|
+
category: 'Asia-Pacific',
|
|
184
|
+
selected: false
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'ap-south-storage',
|
|
188
|
+
name: 'ap-south-storage',
|
|
189
|
+
displayName: 'Asia-Pacific Storage',
|
|
190
|
+
description: 'Object storage service',
|
|
191
|
+
currentStatus: 'operational',
|
|
192
|
+
lastChecked: Date.now(),
|
|
193
|
+
uptime30d: 99.95,
|
|
194
|
+
uptime90d: 99.93,
|
|
195
|
+
responseTime: 42,
|
|
196
|
+
category: 'Asia-Pacific',
|
|
197
|
+
selected: false
|
|
198
|
+
},
|
|
199
|
+
// Supporting Services
|
|
200
|
+
{
|
|
201
|
+
id: 'cdn',
|
|
202
|
+
name: 'cdn',
|
|
203
|
+
displayName: 'Content Delivery Network',
|
|
204
|
+
description: 'Global CDN for static assets',
|
|
205
|
+
currentStatus: 'operational',
|
|
206
|
+
lastChecked: Date.now(),
|
|
207
|
+
uptime30d: 100,
|
|
208
|
+
uptime90d: 99.99,
|
|
209
|
+
responseTime: 12,
|
|
210
|
+
category: 'Network',
|
|
211
|
+
selected: true
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 'dns',
|
|
215
|
+
name: 'dns',
|
|
216
|
+
displayName: 'DNS Service',
|
|
217
|
+
description: 'Managed DNS resolution',
|
|
218
|
+
currentStatus: 'operational',
|
|
219
|
+
lastChecked: Date.now(),
|
|
220
|
+
uptime30d: 100,
|
|
221
|
+
uptime90d: 100,
|
|
222
|
+
responseTime: 8,
|
|
223
|
+
category: 'Network',
|
|
224
|
+
selected: false
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: 'monitoring',
|
|
228
|
+
name: 'monitoring',
|
|
229
|
+
displayName: 'Monitoring Service',
|
|
230
|
+
description: 'Infrastructure monitoring',
|
|
231
|
+
currentStatus: 'operational',
|
|
232
|
+
lastChecked: Date.now(),
|
|
233
|
+
uptime30d: 99.92,
|
|
234
|
+
uptime90d: 99.90,
|
|
235
|
+
responseTime: 65,
|
|
236
|
+
category: 'Operations',
|
|
237
|
+
selected: true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: 'logging',
|
|
241
|
+
name: 'logging',
|
|
242
|
+
displayName: 'Logging Service',
|
|
243
|
+
description: 'Centralized log management',
|
|
244
|
+
currentStatus: 'operational',
|
|
245
|
+
lastChecked: Date.now(),
|
|
246
|
+
uptime30d: 99.88,
|
|
247
|
+
uptime90d: 99.85,
|
|
248
|
+
responseTime: 72,
|
|
249
|
+
category: 'Operations',
|
|
250
|
+
selected: false
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: 'backup-service',
|
|
254
|
+
name: 'backup-service',
|
|
255
|
+
displayName: 'Backup Service',
|
|
256
|
+
description: 'Automated backup system',
|
|
257
|
+
currentStatus: 'operational',
|
|
258
|
+
lastChecked: Date.now(),
|
|
259
|
+
uptime30d: 100,
|
|
260
|
+
uptime90d: 99.98,
|
|
261
|
+
responseTime: 95,
|
|
262
|
+
category: 'Operations',
|
|
263
|
+
selected: false
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: 'email-service',
|
|
267
|
+
name: 'email-service',
|
|
268
|
+
displayName: 'Email Delivery',
|
|
269
|
+
description: 'Transactional email service',
|
|
270
|
+
currentStatus: 'operational',
|
|
271
|
+
lastChecked: Date.now(),
|
|
272
|
+
uptime30d: 99.94,
|
|
273
|
+
uptime90d: 99.91,
|
|
274
|
+
responseTime: 125,
|
|
275
|
+
category: 'Communication',
|
|
276
|
+
selected: true
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
id: 'sms-service',
|
|
280
|
+
name: 'sms-service',
|
|
281
|
+
displayName: 'SMS Gateway',
|
|
282
|
+
description: 'SMS notification service',
|
|
283
|
+
currentStatus: 'operational',
|
|
284
|
+
lastChecked: Date.now(),
|
|
285
|
+
uptime30d: 99.89,
|
|
286
|
+
uptime90d: 99.87,
|
|
287
|
+
responseTime: 180,
|
|
288
|
+
category: 'Communication',
|
|
289
|
+
selected: false
|
|
290
|
+
}
|
|
291
|
+
];
|
|
292
|
+
|
|
293
|
+
assetsSelector.services = services;
|
|
294
|
+
|
|
295
|
+
// Configure Status Details (48 hours of data)
|
|
296
|
+
const generateStatusDetails = (): IStatusHistoryPoint[] => {
|
|
297
|
+
const details: IStatusHistoryPoint[] = [];
|
|
298
|
+
const now = new Date();
|
|
299
|
+
|
|
300
|
+
for (let i = 47; i >= 0; i--) {
|
|
301
|
+
const date = new Date(now);
|
|
302
|
+
date.setMinutes(0, 0, 0);
|
|
303
|
+
date.setHours(date.getHours() - i);
|
|
304
|
+
|
|
305
|
+
let status: 'operational' | 'degraded' | 'outage' = 'operational';
|
|
306
|
+
let value = 100;
|
|
307
|
+
|
|
308
|
+
// Simulate the EU-West issues from 6-3 hours ago
|
|
309
|
+
if (i >= 3 && i <= 6) {
|
|
310
|
+
status = 'degraded';
|
|
311
|
+
value = 85 + Math.random() * 10;
|
|
312
|
+
} else if (i > 6 && i <= 12) {
|
|
313
|
+
// Some minor issues earlier
|
|
314
|
+
if (Math.random() > 0.8) {
|
|
315
|
+
status = 'degraded';
|
|
316
|
+
value = 90 + Math.random() * 10;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
details.push({
|
|
321
|
+
timestamp: date.getTime(),
|
|
322
|
+
status,
|
|
323
|
+
responseTime: status === 'operational' ? 20 + Math.random() * 30 : 50 + Math.random() * 100
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return details;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
statusDetails.dataPoints = generateStatusDetails();
|
|
331
|
+
statusDetails.serviceId = 'eu-west-database';
|
|
332
|
+
statusDetails.serviceName = 'EU-West Database';
|
|
333
|
+
|
|
334
|
+
// Configure Monthly Status
|
|
335
|
+
const generateMonthlyData = (): IMonthlyUptime[] => {
|
|
336
|
+
const months: IMonthlyUptime[] = [];
|
|
337
|
+
const now = new Date();
|
|
338
|
+
|
|
339
|
+
for (let m = 4; m >= 0; m--) {
|
|
340
|
+
const monthDate = new Date(now.getFullYear(), now.getMonth() - m, 1);
|
|
341
|
+
const daysInMonth = new Date(monthDate.getFullYear(), monthDate.getMonth() + 1, 0).getDate();
|
|
342
|
+
const monthKey = monthDate.toISOString().slice(0, 7);
|
|
343
|
+
|
|
344
|
+
const days = [];
|
|
345
|
+
let totalUptime = 0;
|
|
346
|
+
let incidents = 0;
|
|
347
|
+
|
|
348
|
+
for (let d = 1; d <= daysInMonth; d++) {
|
|
349
|
+
const dayDate = new Date(monthDate.getFullYear(), monthDate.getMonth(), d);
|
|
350
|
+
const isToday = dayDate.toDateString() === now.toDateString();
|
|
351
|
+
const isFuture = dayDate > now;
|
|
352
|
+
|
|
353
|
+
if (isFuture) continue;
|
|
354
|
+
|
|
355
|
+
let status: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' = 'operational';
|
|
356
|
+
let uptime = 100;
|
|
357
|
+
let dayIncidents = 0;
|
|
358
|
+
|
|
359
|
+
// Add some random incidents
|
|
360
|
+
if (!isToday && Math.random() > 0.92) {
|
|
361
|
+
status = 'degraded';
|
|
362
|
+
uptime = 95 + Math.random() * 4;
|
|
363
|
+
dayIncidents = 1;
|
|
364
|
+
} else if (!isToday && Math.random() > 0.98) {
|
|
365
|
+
status = 'partial_outage';
|
|
366
|
+
uptime = 80 + Math.random() * 15;
|
|
367
|
+
dayIncidents = 2;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Today's incident
|
|
371
|
+
if (isToday) {
|
|
372
|
+
status = 'degraded';
|
|
373
|
+
uptime = 96.5;
|
|
374
|
+
dayIncidents = 1;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
days.push({
|
|
378
|
+
date: dayDate.toISOString().slice(0, 10),
|
|
379
|
+
status,
|
|
380
|
+
uptime,
|
|
381
|
+
incidents: dayIncidents,
|
|
382
|
+
totalDowntime: Math.round((100 - uptime) * 14.4) // Convert to minutes (1440 minutes per day)
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
totalUptime += uptime;
|
|
386
|
+
incidents += dayIncidents;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
months.push({
|
|
390
|
+
month: monthKey,
|
|
391
|
+
days,
|
|
392
|
+
overallUptime: totalUptime / days.length,
|
|
393
|
+
totalIncidents: incidents
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return months;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
statusMonth.monthlyData = generateMonthlyData();
|
|
401
|
+
statusMonth.serviceId = 'all-services';
|
|
402
|
+
statusMonth.serviceName = 'All Services';
|
|
403
|
+
|
|
404
|
+
// Configure Incidents
|
|
405
|
+
const currentIncidents: IIncidentDetails[] = [
|
|
406
|
+
{
|
|
407
|
+
id: 'inc-2024-001',
|
|
408
|
+
title: 'EU-West Database Performance Degradation',
|
|
409
|
+
impact: 'Users in EU-West region may experience slower database queries and occasional timeouts',
|
|
410
|
+
severity: 'major',
|
|
411
|
+
status: 'investigating',
|
|
412
|
+
startTime: Date.now() - 3 * 60 * 60 * 1000, // 3 hours ago
|
|
413
|
+
affectedServices: ['EU-West Database', 'EU-West Compute', 'EU-West Storage'],
|
|
414
|
+
updates: [
|
|
415
|
+
{
|
|
416
|
+
id: 'update-1',
|
|
417
|
+
timestamp: Date.now() - 3 * 60 * 60 * 1000,
|
|
418
|
+
status: 'investigating',
|
|
419
|
+
message: 'We are investigating reports of database performance issues in the EU-West region.',
|
|
420
|
+
author: 'CloudFlow Operations'
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: 'update-2',
|
|
424
|
+
timestamp: Date.now() - 2.5 * 60 * 60 * 1000,
|
|
425
|
+
status: 'identified',
|
|
426
|
+
message: 'We have identified unusual load patterns on our EU-West database cluster. Our team is working on redistributing the load.',
|
|
427
|
+
author: 'Database Team'
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
id: 'update-3',
|
|
431
|
+
timestamp: Date.now() - 1 * 60 * 60 * 1000,
|
|
432
|
+
status: 'monitoring',
|
|
433
|
+
message: 'Load balancing adjustments have been applied. We are monitoring the situation closely. Performance is gradually improving.',
|
|
434
|
+
author: 'CloudFlow Operations'
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
];
|
|
439
|
+
|
|
440
|
+
const pastIncidents: IIncidentDetails[] = [
|
|
441
|
+
{
|
|
442
|
+
id: 'inc-2023-098',
|
|
443
|
+
title: 'Global Authentication Service Outage',
|
|
444
|
+
impact: 'Users were unable to log in to their accounts',
|
|
445
|
+
severity: 'critical',
|
|
446
|
+
status: 'resolved',
|
|
447
|
+
startTime: Date.now() - 7 * 24 * 60 * 60 * 1000, // 7 days ago
|
|
448
|
+
endTime: Date.now() - 7 * 24 * 60 * 60 * 1000 + 2 * 60 * 60 * 1000, // 2 hour duration
|
|
449
|
+
affectedServices: ['Authentication Service', 'User Dashboard', 'API Gateway'],
|
|
450
|
+
rootCause: 'A configuration change in our authentication service caused a cascading failure in the token validation system.',
|
|
451
|
+
resolution: 'The configuration was rolled back and additional safeguards were implemented to prevent similar issues.',
|
|
452
|
+
updates: [
|
|
453
|
+
{
|
|
454
|
+
id: 'update-4',
|
|
455
|
+
timestamp: Date.now() - 7 * 24 * 60 * 60 * 1000,
|
|
456
|
+
status: 'investigating',
|
|
457
|
+
message: 'Multiple reports of login failures across all regions.',
|
|
458
|
+
author: 'CloudFlow Operations'
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: 'update-5',
|
|
462
|
+
timestamp: Date.now() - 7 * 24 * 60 * 60 * 1000 + 30 * 60 * 1000,
|
|
463
|
+
status: 'identified',
|
|
464
|
+
message: 'Root cause identified as misconfiguration in auth service. Rolling back changes.',
|
|
465
|
+
author: 'Security Team'
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: 'update-6',
|
|
469
|
+
timestamp: Date.now() - 7 * 24 * 60 * 60 * 1000 + 90 * 60 * 1000,
|
|
470
|
+
status: 'monitoring',
|
|
471
|
+
message: 'Service restored. Monitoring for any lingering issues.',
|
|
472
|
+
author: 'CloudFlow Operations'
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: 'update-7',
|
|
476
|
+
timestamp: Date.now() - 7 * 24 * 60 * 60 * 1000 + 2 * 60 * 60 * 1000,
|
|
477
|
+
status: 'resolved',
|
|
478
|
+
message: 'All systems operating normally. Incident resolved.',
|
|
479
|
+
author: 'CloudFlow Operations'
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
id: 'update-8',
|
|
483
|
+
timestamp: Date.now() - 6 * 24 * 60 * 60 * 1000,
|
|
484
|
+
status: 'postmortem',
|
|
485
|
+
message: 'Postmortem completed. Action items identified and assigned to prevent recurrence.',
|
|
486
|
+
author: 'Engineering Lead'
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: 'inc-2023-095',
|
|
492
|
+
title: 'US-East Storage Service Maintenance',
|
|
493
|
+
impact: 'Reduced redundancy for stored objects during maintenance window',
|
|
494
|
+
severity: 'minor',
|
|
495
|
+
status: 'resolved',
|
|
496
|
+
startTime: Date.now() - 14 * 24 * 60 * 60 * 1000,
|
|
497
|
+
endTime: Date.now() - 14 * 24 * 60 * 60 * 1000 + 4 * 60 * 60 * 1000,
|
|
498
|
+
affectedServices: ['US-East Storage'],
|
|
499
|
+
rootCause: 'Scheduled maintenance for storage infrastructure upgrade.',
|
|
500
|
+
resolution: 'Maintenance completed successfully. All systems operating at full redundancy.',
|
|
501
|
+
updates: [
|
|
502
|
+
{
|
|
503
|
+
id: 'update-9',
|
|
504
|
+
timestamp: Date.now() - 21 * 24 * 60 * 60 * 1000,
|
|
505
|
+
status: 'investigating',
|
|
506
|
+
message: 'Scheduled maintenance announced for US-East Storage service.',
|
|
507
|
+
author: 'CloudFlow Operations'
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
id: 'update-10',
|
|
511
|
+
timestamp: Date.now() - 14 * 24 * 60 * 60 * 1000,
|
|
512
|
+
status: 'monitoring',
|
|
513
|
+
message: 'Maintenance window has begun. No customer impact expected.',
|
|
514
|
+
author: 'Storage Team'
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
id: 'update-11',
|
|
518
|
+
timestamp: Date.now() - 14 * 24 * 60 * 60 * 1000 + 4 * 60 * 60 * 1000,
|
|
519
|
+
status: 'resolved',
|
|
520
|
+
message: 'Maintenance completed successfully.',
|
|
521
|
+
author: 'Storage Team'
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
id: 'inc-2023-089',
|
|
527
|
+
title: 'API Gateway Rate Limiting Issues',
|
|
528
|
+
impact: 'Some API requests were incorrectly rate limited',
|
|
529
|
+
severity: 'major',
|
|
530
|
+
status: 'resolved',
|
|
531
|
+
startTime: Date.now() - 30 * 24 * 60 * 60 * 1000,
|
|
532
|
+
endTime: Date.now() - 30 * 24 * 60 * 60 * 1000 + 45 * 60 * 1000,
|
|
533
|
+
affectedServices: ['API Gateway'],
|
|
534
|
+
rootCause: 'A bug in the rate limiting algorithm caused legitimate requests to be blocked.',
|
|
535
|
+
resolution: 'Hotfix deployed to correct the rate limiting logic.',
|
|
536
|
+
updates: [
|
|
537
|
+
{
|
|
538
|
+
id: 'update-12',
|
|
539
|
+
timestamp: Date.now() - 30 * 24 * 60 * 60 * 1000,
|
|
540
|
+
status: 'investigating',
|
|
541
|
+
message: 'Reports of API requests being blocked despite being within rate limits.',
|
|
542
|
+
author: 'API Team'
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
id: 'update-13',
|
|
546
|
+
timestamp: Date.now() - 30 * 24 * 60 * 60 * 1000 + 20 * 60 * 1000,
|
|
547
|
+
status: 'identified',
|
|
548
|
+
message: 'Bug identified in rate limiting code. Preparing hotfix.',
|
|
549
|
+
author: 'API Team'
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 'update-14',
|
|
553
|
+
timestamp: Date.now() - 30 * 24 * 60 * 60 * 1000 + 45 * 60 * 1000,
|
|
554
|
+
status: 'resolved',
|
|
555
|
+
message: 'Hotfix deployed. Rate limiting now functioning correctly.',
|
|
556
|
+
author: 'API Team'
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
];
|
|
561
|
+
|
|
562
|
+
incidents.currentIncidents = currentIncidents;
|
|
563
|
+
incidents.pastIncidents = pastIncidents;
|
|
564
|
+
|
|
565
|
+
// Configure Stats Grid
|
|
566
|
+
const operationalCount = services.filter(s => s.currentStatus === 'operational').length;
|
|
567
|
+
const totalIncidents = currentIncidents.length + 3; // Current + recent past
|
|
568
|
+
const avgResponseTime = services.reduce((sum, s) => sum + (s.responseTime || 0), 0) / services.length;
|
|
569
|
+
const avgUptime = services.reduce((sum, s) => sum + (s.uptime30d || 0), 0) / services.length;
|
|
570
|
+
|
|
571
|
+
statsGrid.currentStatus = 'degraded';
|
|
572
|
+
statsGrid.uptime = avgUptime;
|
|
573
|
+
statsGrid.avgResponseTime = Math.round(avgResponseTime);
|
|
574
|
+
statsGrid.totalIncidents = totalIncidents;
|
|
575
|
+
statsGrid.affectedServices = services.filter(s => s.currentStatus !== 'operational').length;
|
|
576
|
+
statsGrid.totalServices = services.length;
|
|
577
|
+
statsGrid.timePeriod = '30 days';
|
|
578
|
+
|
|
579
|
+
// Configure Footer
|
|
580
|
+
footer.companyName = 'CloudFlow Infrastructure';
|
|
581
|
+
footer.legalUrl = 'https://cloudflow.example.com/legal';
|
|
582
|
+
footer.supportEmail = 'support@cloudflow.example.com';
|
|
583
|
+
footer.statusPageUrl = 'https://status.cloudflow.example.com';
|
|
584
|
+
footer.lastUpdated = Date.now();
|
|
585
|
+
footer.currentYear = new Date().getFullYear();
|
|
586
|
+
footer.socialLinks = [
|
|
587
|
+
{ platform: 'twitter', url: 'https://twitter.com/cloudflow' },
|
|
588
|
+
{ platform: 'github', url: 'https://github.com/cloudflow' },
|
|
589
|
+
{ platform: 'linkedin', url: 'https://linkedin.com/company/cloudflow' }
|
|
590
|
+
];
|
|
591
|
+
footer.rssFeedUrl = 'https://status.cloudflow.example.com/rss';
|
|
592
|
+
footer.apiStatusUrl = 'https://api.cloudflow.example.com/v1/status';
|
|
593
|
+
footer.enableSubscribe = true;
|
|
594
|
+
footer.subscriberCount = 2847;
|
|
595
|
+
footer.additionalLinks = [
|
|
596
|
+
{ label: 'API Documentation', url: 'https://docs.cloudflow.example.com' },
|
|
597
|
+
{ label: 'Service SLA', url: 'https://cloudflow.example.com/sla' },
|
|
598
|
+
{ label: 'Privacy Policy', url: 'https://cloudflow.example.com/privacy' }
|
|
599
|
+
];
|
|
600
|
+
|
|
601
|
+
// Add event listeners for interactivity
|
|
602
|
+
header.addEventListener('reportNewIncident', () => {
|
|
603
|
+
alert('Report Incident: This would open a form to report a new incident.');
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
header.addEventListener('statusSubscribe', () => {
|
|
607
|
+
alert('Subscribe: This would open a subscription form for status updates.');
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
footer.addEventListener('subscribeClick', () => {
|
|
611
|
+
alert('Subscribe to updates: Enter your email for status notifications.');
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
assetsSelector.addEventListener('selectionChanged', (event: CustomEvent) => {
|
|
615
|
+
console.log('Selected services changed:', event.detail.selectedServices);
|
|
616
|
+
// In a real app, this would update the other components to show only selected services
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
statusMonth.addEventListener('dayClick', (event: CustomEvent) => {
|
|
620
|
+
console.log('Day clicked:', event.detail);
|
|
621
|
+
alert(`Day details: ${event.detail.date}\nUptime: ${event.detail.uptime}%\nIncidents: ${event.detail.incidents}`);
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
// Simulate real-time updates
|
|
625
|
+
setInterval(() => {
|
|
626
|
+
// Update last checked times
|
|
627
|
+
services.forEach(service => {
|
|
628
|
+
service.lastChecked = Date.now();
|
|
629
|
+
// Randomly change response times
|
|
630
|
+
service.responseTime = service.responseTime * (0.9 + Math.random() * 0.2);
|
|
631
|
+
});
|
|
632
|
+
assetsSelector.requestUpdate();
|
|
633
|
+
|
|
634
|
+
// Update overall status last updated
|
|
635
|
+
statusBar.overallStatus = { ...statusBar.overallStatus, lastUpdated: Date.now() };
|
|
636
|
+
|
|
637
|
+
// Update footer last updated
|
|
638
|
+
footer.lastUpdated = Date.now();
|
|
639
|
+
}, 30000); // Every 30 seconds
|
|
640
|
+
}}
|
|
641
|
+
>
|
|
642
|
+
<upl-statuspage-header></upl-statuspage-header>
|
|
643
|
+
<upl-statuspage-pagetitle></upl-statuspage-pagetitle>
|
|
644
|
+
<upl-statuspage-statusbar></upl-statuspage-statusbar>
|
|
645
|
+
<upl-statuspage-statsgrid></upl-statuspage-statsgrid>
|
|
646
|
+
<upl-statuspage-assetsselector></upl-statuspage-assetsselector>
|
|
647
|
+
<upl-statuspage-statusdetails></upl-statuspage-statusdetails>
|
|
648
|
+
<upl-statuspage-statusmonth></upl-statuspage-statusmonth>
|
|
649
|
+
<upl-statuspage-incidents></upl-statuspage-incidents>
|
|
650
|
+
<upl-statuspage-footer></upl-statuspage-footer>
|
|
651
|
+
</dees-demowrapper>
|
|
652
|
+
</div>
|
|
653
|
+
`;
|