@astryxdesign/cli 0.4.3 → 0.4.4-canary.0f4d45f
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/CHANGELOG.md +40 -0
- package/README.md +45 -43
- package/api/discover/_adapter.d.mts +5 -3
- package/api/discover/_adapter.mjs +6 -4
- package/api/template/cdn/cdn.d.mts +23 -0
- package/api/template/cdn/cdn.mjs +86 -0
- package/api/template/cdn/cdn.test.mjs +108 -0
- package/api/template/template.d.mts +2 -0
- package/api/template/template.doc.mjs +21 -3
- package/api/template/template.mjs +16 -2
- package/api/template/template.type.d.mts +19 -0
- package/api/template/template.type.mjs +12 -0
- package/api/theme/theme.type.d.mts +16 -0
- package/api/theme/theme.type.mjs +11 -0
- package/assets/cdn.template.html +124 -0
- package/assets/docs/theme.doc.dense.mjs +1 -1
- package/assets/docs/theme.doc.mjs +5 -4
- package/assets/docs/theme.doc.zh.mjs +1 -1
- package/assets/templates/blocks/components/BottomSheet/BottomSheetHeights.doc.mjs +21 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetHeights.tsx +46 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetMobileKeyboard.doc.mjs +23 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetMobileKeyboard.tsx +100 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetNoScrim.doc.mjs +22 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetNoScrim.tsx +47 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetShowcase.doc.mjs +22 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetShowcase.tsx +51 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.doc.mjs +26 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.tsx +221 -0
- package/assets/theme.template.ts +4 -3
- package/authoring/doctypes/base/type.ts +9 -0
- package/clients/cli/commands/build-theme.mjs +154 -65
- package/clients/cli/commands/build-theme.multi.test.mjs +148 -0
- package/clients/cli/commands/build-theme.watch.test.mjs +67 -0
- package/clients/cli/commands/discover.broken-integration.test.mjs +112 -0
- package/clients/cli/commands/discover.mjs +12 -0
- package/clients/cli/commands/search.mjs +9 -0
- package/clients/cli/commands/template-cdn.behavior.test.mjs +113 -0
- package/clients/cli/commands/template.doc.mjs +12 -2
- package/clients/cli/commands/template.mjs +24 -3
- package/clients/cli/commands/theme-build.doc.mjs +11 -5
- package/clients/cli/lib/json-shim.test.mjs +1 -1
- package/clients/cli/lib/manifest.mjs +3 -2
- package/clients/cli/lib/manifest.test.mjs +4 -2
- package/foundation/integrations/integration-warnings.test.mjs +17 -0
- package/foundation/integrations/validate-contributions.mjs +7 -0
- package/foundation/response/response-types.doc.mjs +11 -0
- package/foundation/text/copyright-header.mjs +11 -4
- package/package.json +12 -9
- package/assets/templates/pages/table-page-chart/page.tsx +0 -577
- package/assets/templates/pages/table-page-chart/template.doc.mjs +0 -13
- package/assets/templates/pages/table-page-heatmap-status/page.tsx +0 -467
- package/assets/templates/pages/table-page-heatmap-status/template.doc.mjs +0 -13
- package/assets/templates/pages/table-page-shoe-store-heatmap/page.tsx +0 -931
- package/assets/templates/pages/table-page-shoe-store-heatmap/template.doc.mjs +0 -13
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {useMemo} from 'react';
|
|
6
|
-
import {
|
|
7
|
-
VStack,
|
|
8
|
-
HStack,
|
|
9
|
-
StackItem,
|
|
10
|
-
Layout,
|
|
11
|
-
LayoutContent,
|
|
12
|
-
LayoutHeader,
|
|
13
|
-
} from '@astryxdesign/core/Layout';
|
|
14
|
-
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
15
|
-
import {Button} from '@astryxdesign/core/Button';
|
|
16
|
-
import {IconButton} from '@astryxdesign/core/IconButton';
|
|
17
|
-
import {Icon} from '@astryxdesign/core/Icon';
|
|
18
|
-
import {Avatar} from '@astryxdesign/core/Avatar';
|
|
19
|
-
import {Badge} from '@astryxdesign/core/Badge';
|
|
20
|
-
import {Link} from '@astryxdesign/core/Link';
|
|
21
|
-
import {Table, proportional, pixel} from '@astryxdesign/core/Table';
|
|
22
|
-
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
23
|
-
import {Chart, ChartAxis, ChartHeatmapGL} from '@astryxdesign/lab';
|
|
24
|
-
import {
|
|
25
|
-
FunnelIcon,
|
|
26
|
-
ArrowDownTrayIcon,
|
|
27
|
-
ArrowPathIcon,
|
|
28
|
-
} from '@heroicons/react/24/outline';
|
|
29
|
-
|
|
30
|
-
// ============= DATA =============
|
|
31
|
-
|
|
32
|
-
type Severity = 'critical' | 'major' | 'minor' | 'resolved';
|
|
33
|
-
type ProductName =
|
|
34
|
-
| 'Ads Manager'
|
|
35
|
-
| 'Business Suite'
|
|
36
|
-
| 'Commerce Manager'
|
|
37
|
-
| 'Pages'
|
|
38
|
-
| 'Messenger API'
|
|
39
|
-
| 'Graph API'
|
|
40
|
-
| 'WhatsApp Business'
|
|
41
|
-
| 'Instagram API';
|
|
42
|
-
|
|
43
|
-
function avatarSvg(bg: string) {
|
|
44
|
-
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="${bg}"/><circle cx="50" cy="38" r="18" fill="white" opacity="0.85"/><ellipse cx="50" cy="90" rx="30" ry="28" fill="white" opacity="0.85"/></svg>`;
|
|
45
|
-
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const ONCALL_AVATARS: Record<string, string> = {
|
|
49
|
-
'Sarah Chen': avatarSvg('#6366F1'),
|
|
50
|
-
'David Kim': avatarSvg('#EC4899'),
|
|
51
|
-
'Priya Sharma': avatarSvg('#F59E0B'),
|
|
52
|
-
'Marcus Rivera': avatarSvg('#10B981'),
|
|
53
|
-
'Elena Volkov': avatarSvg('#8B5CF6'),
|
|
54
|
-
'Noah Williams': avatarSvg('#EF4444'),
|
|
55
|
-
'Mei Lin': avatarSvg('#06B6D4'),
|
|
56
|
-
'Carlos Mendez': avatarSvg('#F97316'),
|
|
57
|
-
'Fatima Al-Rashid': avatarSvg('#3B82F6'),
|
|
58
|
-
'Lucas Andersson': avatarSvg('#14B8A6'),
|
|
59
|
-
'Sofia Garcia': avatarSvg('#A855F7'),
|
|
60
|
-
'Raj Kapoor': avatarSvg('#E11D48'),
|
|
61
|
-
'Emma Thompson': avatarSvg('#0EA5E9'),
|
|
62
|
-
'Andre Santos': avatarSvg('#84CC16'),
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
interface IncidentRow extends Record<string, unknown> {
|
|
66
|
-
id: string;
|
|
67
|
-
product: ProductName;
|
|
68
|
-
title: string;
|
|
69
|
-
severity: Severity;
|
|
70
|
-
status: 'ongoing' | 'identified' | 'monitoring' | 'resolved';
|
|
71
|
-
oncall: string;
|
|
72
|
-
startTime: string;
|
|
73
|
-
duration: string;
|
|
74
|
-
date: string;
|
|
75
|
-
dayOfWeek: number;
|
|
76
|
-
hour: number;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const incidents: IncidentRow[] = [
|
|
80
|
-
// Active — ongoing
|
|
81
|
-
{
|
|
82
|
-
id: 'INC-4008',
|
|
83
|
-
product: 'Business Suite',
|
|
84
|
-
title:
|
|
85
|
-
'Notification delivery delays affecting mobile push and email channels — queue saturation under investigation',
|
|
86
|
-
severity: 'major',
|
|
87
|
-
oncall: 'Carlos Mendez',
|
|
88
|
-
status: 'ongoing',
|
|
89
|
-
startTime: '09:15',
|
|
90
|
-
duration: 'ongoing',
|
|
91
|
-
date: '2025-01-15',
|
|
92
|
-
dayOfWeek: 3,
|
|
93
|
-
hour: 9,
|
|
94
|
-
},
|
|
95
|
-
// Tue (2) 3pm — the only major outage cluster (3 incidents)
|
|
96
|
-
{
|
|
97
|
-
id: 'INC-4001',
|
|
98
|
-
product: 'Ads Manager',
|
|
99
|
-
title:
|
|
100
|
-
'Campaign creation timing out for ~12% of advertisers in EMEA region — root caused to elevated DB write latency',
|
|
101
|
-
severity: 'critical',
|
|
102
|
-
oncall: 'Sarah Chen',
|
|
103
|
-
status: 'resolved',
|
|
104
|
-
startTime: '15:10',
|
|
105
|
-
duration: '2h 15m',
|
|
106
|
-
date: '2025-01-14',
|
|
107
|
-
dayOfWeek: 2,
|
|
108
|
-
hour: 15,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: 'INC-4002',
|
|
112
|
-
product: 'Graph API',
|
|
113
|
-
title:
|
|
114
|
-
'Elevated 5xx error rates on /me and /me/accounts endpoints affecting third-party integrations globally',
|
|
115
|
-
severity: 'critical',
|
|
116
|
-
oncall: 'David Kim',
|
|
117
|
-
status: 'resolved',
|
|
118
|
-
startTime: '15:30',
|
|
119
|
-
duration: '3h 20m',
|
|
120
|
-
date: '2025-01-14',
|
|
121
|
-
dayOfWeek: 2,
|
|
122
|
-
hour: 15,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 'INC-4003',
|
|
126
|
-
product: 'Instagram API',
|
|
127
|
-
title:
|
|
128
|
-
'Media upload failures for image and video content via /media endpoint affecting ~8% of publishers',
|
|
129
|
-
severity: 'major',
|
|
130
|
-
oncall: 'Priya Sharma',
|
|
131
|
-
status: 'resolved',
|
|
132
|
-
startTime: '15:05',
|
|
133
|
-
duration: '1h 50m',
|
|
134
|
-
date: '2025-01-14',
|
|
135
|
-
dayOfWeek: 2,
|
|
136
|
-
hour: 15,
|
|
137
|
-
},
|
|
138
|
-
// Tue (2) 4pm — spillover (2 incidents)
|
|
139
|
-
{
|
|
140
|
-
id: 'INC-4004',
|
|
141
|
-
product: 'Ads Manager',
|
|
142
|
-
title:
|
|
143
|
-
'Audience insights tab returning empty results due to cache invalidation cascade from earlier outage',
|
|
144
|
-
severity: 'minor',
|
|
145
|
-
oncall: 'Marcus Rivera',
|
|
146
|
-
status: 'resolved',
|
|
147
|
-
startTime: '16:00',
|
|
148
|
-
duration: '45m',
|
|
149
|
-
date: '2025-01-14',
|
|
150
|
-
dayOfWeek: 2,
|
|
151
|
-
hour: 16,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
id: 'INC-4005',
|
|
155
|
-
product: 'WhatsApp Business',
|
|
156
|
-
title:
|
|
157
|
-
'Outbound message delivery delays of 2-5 minutes for high-volume senders due to queue backpressure',
|
|
158
|
-
severity: 'major',
|
|
159
|
-
oncall: 'Elena Volkov',
|
|
160
|
-
status: 'resolved',
|
|
161
|
-
startTime: '16:20',
|
|
162
|
-
duration: '1h 15m',
|
|
163
|
-
date: '2025-01-14',
|
|
164
|
-
dayOfWeek: 2,
|
|
165
|
-
hour: 16,
|
|
166
|
-
},
|
|
167
|
-
// Thu (4) 10am — single incident
|
|
168
|
-
{
|
|
169
|
-
id: 'INC-4006',
|
|
170
|
-
product: 'Commerce Manager',
|
|
171
|
-
title:
|
|
172
|
-
'Product catalog sync failures from Shopify and BigCommerce integrations after schema migration deployed',
|
|
173
|
-
severity: 'major',
|
|
174
|
-
oncall: 'Noah Williams',
|
|
175
|
-
status: 'resolved',
|
|
176
|
-
startTime: '10:15',
|
|
177
|
-
duration: '2h 40m',
|
|
178
|
-
date: '2025-01-16',
|
|
179
|
-
dayOfWeek: 4,
|
|
180
|
-
hour: 10,
|
|
181
|
-
},
|
|
182
|
-
// Fri (5) 4pm — single incident
|
|
183
|
-
{
|
|
184
|
-
id: 'INC-4007',
|
|
185
|
-
product: 'Messenger API',
|
|
186
|
-
title:
|
|
187
|
-
'Webhook delivery failures for subscribed page events — retries succeeded but signaled false alerts',
|
|
188
|
-
severity: 'minor',
|
|
189
|
-
oncall: 'Mei Lin',
|
|
190
|
-
status: 'resolved',
|
|
191
|
-
startTime: '16:30',
|
|
192
|
-
duration: '45m',
|
|
193
|
-
date: '2025-01-17',
|
|
194
|
-
dayOfWeek: 5,
|
|
195
|
-
hour: 16,
|
|
196
|
-
},
|
|
197
|
-
// Active incident
|
|
198
|
-
// Scattered minor blips — light pink cells
|
|
199
|
-
{
|
|
200
|
-
id: 'INC-4009',
|
|
201
|
-
product: 'Pages',
|
|
202
|
-
title:
|
|
203
|
-
'Image upload timeouts for posts larger than 4MB — auto-recovered after CDN region failover',
|
|
204
|
-
severity: 'minor',
|
|
205
|
-
oncall: 'Fatima Al-Rashid',
|
|
206
|
-
status: 'resolved',
|
|
207
|
-
startTime: '11:00',
|
|
208
|
-
duration: '20m',
|
|
209
|
-
date: '2025-01-12',
|
|
210
|
-
dayOfWeek: 0,
|
|
211
|
-
hour: 11,
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: 'INC-4010',
|
|
215
|
-
product: 'Graph API',
|
|
216
|
-
title:
|
|
217
|
-
'Intermittent 503 errors on a single load balancer in us-east-1 — auto-healed by health check rotation',
|
|
218
|
-
severity: 'minor',
|
|
219
|
-
oncall: 'Lucas Andersson',
|
|
220
|
-
status: 'resolved',
|
|
221
|
-
startTime: '14:30',
|
|
222
|
-
duration: '15m',
|
|
223
|
-
date: '2025-01-13',
|
|
224
|
-
dayOfWeek: 1,
|
|
225
|
-
hour: 14,
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
id: 'INC-4011',
|
|
229
|
-
product: 'WhatsApp Business',
|
|
230
|
-
title:
|
|
231
|
-
'Template message rejections due to stale category cache for newly approved templates',
|
|
232
|
-
severity: 'minor',
|
|
233
|
-
oncall: 'Sofia Garcia',
|
|
234
|
-
status: 'resolved',
|
|
235
|
-
startTime: '13:00',
|
|
236
|
-
duration: '30m',
|
|
237
|
-
date: '2025-01-16',
|
|
238
|
-
dayOfWeek: 4,
|
|
239
|
-
hour: 13,
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
id: 'INC-4012',
|
|
243
|
-
product: 'Commerce Manager',
|
|
244
|
-
title:
|
|
245
|
-
'Inventory count mismatch between checkout and catalog services for ~200 SKUs in test region',
|
|
246
|
-
severity: 'minor',
|
|
247
|
-
oncall: 'Raj Kapoor',
|
|
248
|
-
status: 'resolved',
|
|
249
|
-
startTime: '12:00',
|
|
250
|
-
duration: '1h 00m',
|
|
251
|
-
date: '2025-01-17',
|
|
252
|
-
dayOfWeek: 5,
|
|
253
|
-
hour: 12,
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
id: 'INC-4013',
|
|
257
|
-
product: 'Instagram API',
|
|
258
|
-
title:
|
|
259
|
-
'Story insights data delayed by 30-60 minutes for accounts with >100K followers',
|
|
260
|
-
severity: 'minor',
|
|
261
|
-
oncall: 'Emma Thompson',
|
|
262
|
-
status: 'resolved',
|
|
263
|
-
startTime: '10:00',
|
|
264
|
-
duration: '45m',
|
|
265
|
-
date: '2025-01-18',
|
|
266
|
-
dayOfWeek: 6,
|
|
267
|
-
hour: 10,
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
id: 'INC-4014',
|
|
271
|
-
product: 'Business Suite',
|
|
272
|
-
title:
|
|
273
|
-
'Slow inbox loading times (>3s p95) for accounts with large message histories — index rebuild in progress',
|
|
274
|
-
severity: 'minor',
|
|
275
|
-
oncall: 'Andre Santos',
|
|
276
|
-
status: 'resolved',
|
|
277
|
-
startTime: '15:00',
|
|
278
|
-
duration: '25m',
|
|
279
|
-
date: '2025-01-15',
|
|
280
|
-
dayOfWeek: 3,
|
|
281
|
-
hour: 15,
|
|
282
|
-
},
|
|
283
|
-
];
|
|
284
|
-
|
|
285
|
-
const DAYS = [
|
|
286
|
-
'Jan 12',
|
|
287
|
-
'Jan 13',
|
|
288
|
-
'Jan 14',
|
|
289
|
-
'Jan 15',
|
|
290
|
-
'Jan 16',
|
|
291
|
-
'Jan 17',
|
|
292
|
-
'Jan 18',
|
|
293
|
-
];
|
|
294
|
-
const HOURS = [
|
|
295
|
-
'9am',
|
|
296
|
-
'10am',
|
|
297
|
-
'11am',
|
|
298
|
-
'12pm',
|
|
299
|
-
'1pm',
|
|
300
|
-
'2pm',
|
|
301
|
-
'3pm',
|
|
302
|
-
'4pm',
|
|
303
|
-
'5pm',
|
|
304
|
-
];
|
|
305
|
-
|
|
306
|
-
function buildHeatmapData(data: IncidentRow[]) {
|
|
307
|
-
return HOURS.flatMap((hour, hi) =>
|
|
308
|
-
DAYS.map((day, di) => {
|
|
309
|
-
const hourValue = 9 + hi;
|
|
310
|
-
const count = data.filter(
|
|
311
|
-
o => o.dayOfWeek === di && o.hour === hourValue,
|
|
312
|
-
).length;
|
|
313
|
-
return {day, hour, incidents: count};
|
|
314
|
-
}),
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
const statusVariant: Record<string, 'error' | 'warning' | 'info' | 'success'> =
|
|
319
|
-
{
|
|
320
|
-
ongoing: 'error',
|
|
321
|
-
identified: 'warning',
|
|
322
|
-
monitoring: 'info',
|
|
323
|
-
resolved: 'success',
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
const columns: TableColumn<IncidentRow>[] = [
|
|
327
|
-
{
|
|
328
|
-
key: 'id',
|
|
329
|
-
header: 'Incident',
|
|
330
|
-
width: pixel(110),
|
|
331
|
-
renderCell: (item: IncidentRow) => (
|
|
332
|
-
<Link href="#" isStandalone>
|
|
333
|
-
{item.id}
|
|
334
|
-
</Link>
|
|
335
|
-
),
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
key: 'product',
|
|
339
|
-
header: 'Product',
|
|
340
|
-
width: proportional(2),
|
|
341
|
-
renderCell: (item: IncidentRow) => <Text type="body">{item.product}</Text>,
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
key: 'title',
|
|
345
|
-
header: 'Description',
|
|
346
|
-
width: proportional(5),
|
|
347
|
-
renderCell: (item: IncidentRow) => <Text type="body">{item.title}</Text>,
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
key: 'startTime',
|
|
351
|
-
header: 'Started',
|
|
352
|
-
width: pixel(80),
|
|
353
|
-
renderCell: (item: IncidentRow) => (
|
|
354
|
-
<Text type="body">{item.startTime}</Text>
|
|
355
|
-
),
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
key: 'duration',
|
|
359
|
-
header: 'Duration',
|
|
360
|
-
width: pixel(100),
|
|
361
|
-
renderCell: (item: IncidentRow) => <Text type="body">{item.duration}</Text>,
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
key: 'oncall',
|
|
365
|
-
header: 'On-call',
|
|
366
|
-
width: proportional(2),
|
|
367
|
-
renderCell: (item: IncidentRow) => (
|
|
368
|
-
<HStack gap={2} vAlign="center">
|
|
369
|
-
<Avatar
|
|
370
|
-
name={item.oncall}
|
|
371
|
-
src={ONCALL_AVATARS[item.oncall]}
|
|
372
|
-
size="sm"
|
|
373
|
-
/>
|
|
374
|
-
<Text type="body">{item.oncall}</Text>
|
|
375
|
-
</HStack>
|
|
376
|
-
),
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
key: 'status',
|
|
380
|
-
header: 'Status',
|
|
381
|
-
width: pixel(120),
|
|
382
|
-
renderCell: (item: IncidentRow) => (
|
|
383
|
-
<Badge
|
|
384
|
-
label={item.status.charAt(0).toUpperCase() + item.status.slice(1)}
|
|
385
|
-
variant={statusVariant[item.status]}
|
|
386
|
-
/>
|
|
387
|
-
),
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
key: 'date',
|
|
391
|
-
header: 'Date',
|
|
392
|
-
width: pixel(110),
|
|
393
|
-
renderCell: (item: IncidentRow) => <Text type="body">{item.date}</Text>,
|
|
394
|
-
},
|
|
395
|
-
];
|
|
396
|
-
|
|
397
|
-
// ============= HEATMAP =============
|
|
398
|
-
|
|
399
|
-
function OutageHeatmap() {
|
|
400
|
-
const heatmapData = useMemo(() => buildHeatmapData(incidents), []);
|
|
401
|
-
|
|
402
|
-
return (
|
|
403
|
-
<Chart
|
|
404
|
-
data={heatmapData}
|
|
405
|
-
xKey="day"
|
|
406
|
-
yKeys={['incidents']}
|
|
407
|
-
height={280}
|
|
408
|
-
margin={{left: 0, right: 0, top: 0, bottom: 30}}>
|
|
409
|
-
<ChartAxis position="bottom" />
|
|
410
|
-
<ChartHeatmapGL
|
|
411
|
-
xKey="day"
|
|
412
|
-
yKey="hour"
|
|
413
|
-
valueKey="incidents"
|
|
414
|
-
colorRange={['#dcfce7', '#fee2e2', '#fca5a5', '#ef4444', '#991b1b']}
|
|
415
|
-
/>
|
|
416
|
-
</Chart>
|
|
417
|
-
);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// ============= PAGE =============
|
|
421
|
-
|
|
422
|
-
export default function TablePageHeatmapStatusTemplate() {
|
|
423
|
-
return (
|
|
424
|
-
<Layout
|
|
425
|
-
height="fill"
|
|
426
|
-
header={
|
|
427
|
-
<LayoutHeader hasDivider>
|
|
428
|
-
<HStack gap={2} vAlign="center">
|
|
429
|
-
<StackItem size="fill">
|
|
430
|
-
<Heading level={1}>Status</Heading>
|
|
431
|
-
</StackItem>
|
|
432
|
-
<IconButton
|
|
433
|
-
label="Filter"
|
|
434
|
-
icon={<Icon icon={FunnelIcon} size="sm" />}
|
|
435
|
-
variant="ghost"
|
|
436
|
-
/>
|
|
437
|
-
<IconButton
|
|
438
|
-
label="Export"
|
|
439
|
-
icon={<Icon icon={ArrowDownTrayIcon} size="sm" />}
|
|
440
|
-
variant="ghost"
|
|
441
|
-
/>
|
|
442
|
-
<Button
|
|
443
|
-
label="Refresh"
|
|
444
|
-
icon={<Icon icon={ArrowPathIcon} size="sm" />}
|
|
445
|
-
/>
|
|
446
|
-
</HStack>
|
|
447
|
-
</LayoutHeader>
|
|
448
|
-
}
|
|
449
|
-
content={
|
|
450
|
-
<LayoutContent padding={3}>
|
|
451
|
-
<VStack gap={4}>
|
|
452
|
-
<OutageHeatmap />
|
|
453
|
-
|
|
454
|
-
<Table<IncidentRow>
|
|
455
|
-
data={incidents}
|
|
456
|
-
columns={columns}
|
|
457
|
-
idKey="id"
|
|
458
|
-
density="balanced"
|
|
459
|
-
dividers="rows"
|
|
460
|
-
hasHover
|
|
461
|
-
/>
|
|
462
|
-
</VStack>
|
|
463
|
-
</LayoutContent>
|
|
464
|
-
}
|
|
465
|
-
/>
|
|
466
|
-
);
|
|
467
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'page',
|
|
6
|
-
name: 'Outage Heatmap Table',
|
|
7
|
-
displayName: 'Outage Heatmap Table',
|
|
8
|
-
description:
|
|
9
|
-
'Product status page with an outage heatmap and incident log table.',
|
|
10
|
-
isReady: true,
|
|
11
|
-
category: 'Table - Heatmap',
|
|
12
|
-
isHiddenFromOverview: true,
|
|
13
|
-
};
|