@wallarm-org/design-system 4.10.0-rc-feat-parser.1 → 4.10.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/README.md +1 -1
- package/dist/components/Badge/generateBadgeVariants.js +9 -28
- package/dist/components/CodeSnippet/internal/FoldToggle.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +71 -84
- package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
- package/dist/components/SimpleCharts/Chart/classes.js +1 -1
- package/dist/components/SimpleCharts/HorizontalBarStack/classes.js +1 -1
- package/dist/components/SimpleCharts/Metric/classes.d.ts +2 -2
- package/dist/components/SimpleCharts/Metric/classes.js +2 -2
- package/dist/components/Table/TableBody/TableBodyCell.js +4 -1
- package/dist/guidelines/patterns/complex-drawer.md +1084 -0
- package/dist/guidelines/patterns/confirmation-dialogs.md +3 -11
- package/dist/guidelines/patterns/detail-drawer.md +31 -13
- package/dist/guidelines/patterns/empty-states.md +6 -5
- package/dist/guidelines/patterns/entity-table.md +25 -29
- package/dist/guidelines/patterns/feedback-toasts.md +3 -11
- package/dist/guidelines/patterns/resource-list-page.md +14 -16
- package/dist/guidelines/rules.md +6 -5
- package/dist/guidelines/templates/ai-assistant.md +1133 -0
- package/dist/guidelines/templates/api-inventory.md +905 -0
- package/dist/guidelines/templates/attack-events.md +2722 -0
- package/dist/guidelines/templates/incident-detail.md +2085 -0
- package/dist/guidelines/templates/integrations-settings.md +836 -0
- package/dist/guidelines/templates/page-states.md +798 -0
- package/dist/guidelines/templates/rule-editor.md +886 -0
- package/dist/guidelines/templates/security-dashboard.md +681 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/metadata/components.json +9 -107
- package/dist/metadata/guidelines.json +1203 -36
- package/dist/theme/tokens.test.ts +52 -0
- package/package.json +1 -4
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +0 -14
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +0 -209
- package/dist/components/Rules/PointSelector/MatchStep.d.ts +0 -15
- package/dist/components/Rules/PointSelector/MatchStep.js +0 -186
- package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +0 -16
- package/dist/components/Rules/PointSelector/MenuFooterHints.js +0 -177
- package/dist/components/Rules/PointSelector/PointPreview.d.ts +0 -10
- package/dist/components/Rules/PointSelector/PointPreview.js +0 -88
- package/dist/components/Rules/PointSelector/PointSelector.d.ts +0 -17
- package/dist/components/Rules/PointSelector/PointSelector.js +0 -937
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +0 -12
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +0 -173
- package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +0 -31
- package/dist/components/Rules/PointSelector/PointSelectorError.js +0 -275
- package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +0 -20
- package/dist/components/Rules/PointSelector/PointSelectorInput.js +0 -130
- package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +0 -31
- package/dist/components/Rules/PointSelector/PointSelectorMenu.js +0 -317
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +0 -8
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +0 -73
- package/dist/components/Rules/PointSelector/SampleRequest.d.ts +0 -14
- package/dist/components/Rules/PointSelector/SampleRequest.js +0 -116
- package/dist/components/Rules/PointSelector/StepMenu.d.ts +0 -40
- package/dist/components/Rules/PointSelector/StepMenu.js +0 -210
- package/dist/components/Rules/PointSelector/VersionWarning.d.ts +0 -26
- package/dist/components/Rules/PointSelector/VersionWarning.js +0 -231
- package/dist/components/Rules/PointSelector/WhereBar.d.ts +0 -48
- package/dist/components/Rules/PointSelector/WhereBar.js +0 -263
- package/dist/components/Rules/PointSelector/classes.d.ts +0 -28
- package/dist/components/Rules/PointSelector/classes.js +0 -22
- package/dist/components/Rules/PointSelector/index.d.ts +0 -20
- package/dist/components/Rules/PointSelector/index.js +0 -18
- package/dist/components/Rules/PointSelector/liftLayer.d.ts +0 -8
- package/dist/components/Rules/PointSelector/liftLayer.js +0 -4
- package/dist/components/Rules/PointSelector/sampleValue.d.ts +0 -6
- package/dist/components/Rules/PointSelector/sampleValue.js +0 -51
- package/dist/components/Rules/PointSelector/sdkBridge.d.ts +0 -508
- package/dist/components/Rules/PointSelector/sdkBridge.js +0 -339
- package/dist/components/Rules/PointSelector/types.d.ts +0 -304
- package/dist/components/Rules/PointSelector/types.js +0 -0
- package/dist/components/Rules/PointSelector/usePointSelector.d.ts +0 -161
- package/dist/components/Rules/PointSelector/usePointSelector.js +0 -1088
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +0 -28
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +0 -208
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +0 -23
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +0 -950
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +0 -21
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +0 -110
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +0 -20
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +0 -31
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +0 -23
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +0 -131
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +0 -17
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +0 -14
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +0 -6
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +0 -6
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +0 -24
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +0 -245
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +0 -15
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +0 -691
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +0 -19
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +0 -72
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +0 -407
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +0 -269
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +0 -25
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +0 -99
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +0 -118
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +0 -446
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +0 -266
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +0 -35
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +0 -57
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +0 -15
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +0 -10
- package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +0 -67
- package/dist/components/Rules/RuleBuilder/RuleBuilder.js +0 -366
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +0 -32
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +0 -420
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +0 -446
- package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +0 -7
- package/dist/components/Rules/RuleBuilder/Summary/index.js +0 -2
- package/dist/components/Rules/RuleBuilder/classes.d.ts +0 -19
- package/dist/components/Rules/RuleBuilder/classes.js +0 -18
- package/dist/components/Rules/RuleBuilder/index.d.ts +0 -55
- package/dist/components/Rules/RuleBuilder/index.js +0 -11
- package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +0 -31
- package/dist/components/Rules/RuleBuilder/models/actionModel.js +0 -276
- package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +0 -95
- package/dist/components/Rules/RuleBuilder/models/conditionModel.js +0 -418
- package/dist/components/Rules/RuleBuilder/models/index.d.ts +0 -3
- package/dist/components/Rules/RuleBuilder/models/index.js +0 -3
- package/dist/components/Rules/RuleBuilder/models/validation.d.ts +0 -176
- package/dist/components/Rules/RuleBuilder/models/validation.js +0 -242
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +0 -92
- package/dist/components/Rules/RuleBuilder/shared/index.d.ts +0 -1
- package/dist/components/Rules/RuleBuilder/shared/index.js +0 -1
- package/dist/components/Rules/RuleBuilder/types.d.ts +0 -384
- package/dist/components/Rules/RuleBuilder/types.js +0 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +0 -65
- package/dist/components/Rules/RuleBuilder/utils/constants.js +0 -356
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +0 -48
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +0 -42
- package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +0 -92
- package/dist/components/Rules/RuleBuilder/utils/helpers.js +0 -54
- package/dist/components/Rules/RuleBuilder/utils/index.d.ts +0 -2
- package/dist/components/Rules/RuleBuilder/utils/index.js +0 -2
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Security dashboard
|
|
3
|
+
description: Use when building the overview screen of a security product, with KPI tiles, traffic and attack charts, breakdowns and a top threats table under one period selector.
|
|
4
|
+
components: [Page, PageHeader, PageHeaderGroup, PageTitle, PageDescription, PageActions, PageToolbar, PageContent, SegmentedControl, SegmentedControlItem, Button, Chart, ChartHeader, ChartTitle, ChartActions, Metric, MetricHeader, MetricValue, MetricTotal, MetricDelta, MetricCaption, MetricSparkline, MetricSkeleton, LineChart, LineChartBody, LineChartGrid, LineChartXAxis, LineChartYAxis, LineChartLine, LineChartTooltip, LineChartLegend, LineChartLegendItem, LineChartHoverPopoverDot, LineChartEmpty, PieChart, PieChartDonut, PieChartCenter, PieChartCenterValue, PieChartCenterLabel, PieChartLegend, PieChartLegendItem, PieChartLegendValue, PieChartLegendPercent, PieChartSkeleton, LegendDot, BarList, BarListItem, BarListBar, BarListLabel, BarListValue, BarListPercent, BarListSkeleton, HorizontalBarStack, HorizontalBarStackSkeleton, Skeleton, Table, TableEmptyState, Badge, HttpMethod, Ip, IpCountry, IpAddress, FormatDateTime, DropdownMenu, EmptyState, Alert, Heading, Text, HStack, VStack]
|
|
5
|
+
keywords: [dashboard, overview, home, security overview, WAAP, API security, KPI, stat tiles, metrics, charts, traffic, incidents, top threats, period selector, time range, analytics]
|
|
6
|
+
order: 10
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Security dashboard
|
|
10
|
+
|
|
11
|
+
The overview screen of a WAAP or API security product: what traffic arrived, what was attacked, what was blocked and what needs a look now. It is a `Page` with one period selector in the toolbar and a grid of `Chart` cards in `PageContent`, ending in a top threats `Table`.
|
|
12
|
+
|
|
13
|
+
## What it shows
|
|
14
|
+
|
|
15
|
+
- Page frame from [Resource list page](../patterns/resource-list-page.md): `PageHeader` with one outline action, the period `SegmentedControl` alone in `PageToolbar`, the card grid in `PageContent`.
|
|
16
|
+
- KPI tiles: `Chart` + `Metric` bricks (`MetricValue`, `MetricTotal connector='of'`, `MetricDelta`) and a `MetricSparkline`.
|
|
17
|
+
- Over time: two `LineChart`s sharing a `syncId`, so hovering one moves the cursor on both; requests and attacks never share an axis.
|
|
18
|
+
- Breakdowns: `PieChart` donut with a centre total, `BarList` of the most attacked endpoints with a `ChartActions` link, `HorizontalBarStack` for incidents by severity.
|
|
19
|
+
- Top threats: one `Table` from [Entity table](../patterns/entity-table.md): `Badge` status, `HttpMethod`, `Ip` with a flag, `FormatDateTime`, the row menu in the Attack master cell.
|
|
20
|
+
- One period drives every card; switching it recomputes all of them.
|
|
21
|
+
- States from [Empty states](../patterns/empty-states.md): chart skeletons and `Table isLoading` while loading; a no-traffic tenant gets one `Alert` with the only action, `LineChartEmpty` copy, a description-only `EmptyState` in each chart card and `TableEmptyState` in the table.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
The whole dashboard; the period selector updates every card.
|
|
26
|
+
|
|
27
|
+
The whole dashboard. The period selector drives every card: KPI tiles with deltas and
|
|
28
|
+
sparklines, traffic and attacks over time on two synced line charts, attack types,
|
|
29
|
+
the most attacked endpoints, incidents by severity, and the top threats table.
|
|
30
|
+
|
|
31
|
+
```tsx story=Default
|
|
32
|
+
import { useState } from 'react';
|
|
33
|
+
import { Button } from '@wallarm-org/design-system/Button';
|
|
34
|
+
import { Heading } from '@wallarm-org/design-system/Heading';
|
|
35
|
+
import { ArrowRight, Download, ExternalLink } from '@wallarm-org/design-system/icons';
|
|
36
|
+
import { Page, PageActions, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
|
|
37
|
+
import { SegmentedControl, SegmentedControlItem } from '@wallarm-org/design-system/SegmentedControl';
|
|
38
|
+
import { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListValue, Chart, ChartActions, ChartHeader, ChartTitle, HorizontalBarStack, LegendDot, LineChart, LineChartBody, LineChartGrid, LineChartHoverPopoverDot, LineChartLegend, LineChartLegendItem, LineChartLine, LineChartTooltip, LineChartXAxis, LineChartYAxis, Metric, MetricCaption, MetricDelta, MetricHeader, MetricSparkline, MetricTotal, MetricValue, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, useChartTimeFormatters } from '@wallarm-org/design-system/SimpleCharts';
|
|
39
|
+
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
|
|
40
|
+
import { Table } from '@wallarm-org/design-system/Table';
|
|
41
|
+
import { Text } from '@wallarm-org/design-system/Text';
|
|
42
|
+
|
|
43
|
+
export const Default = () => {
|
|
44
|
+
const [period, setPeriod] = useState<Period>('24h');
|
|
45
|
+
const { formatHour, formatDate, formatHourWithTimezone, formatDateWithTimezone } =
|
|
46
|
+
useChartTimeFormatters();
|
|
47
|
+
|
|
48
|
+
const data = PERIODS[period];
|
|
49
|
+
const requests = sumOf(data.traffic, 'requests');
|
|
50
|
+
const attacks = sumOf(data.traffic, 'attacks');
|
|
51
|
+
const blocked = sumOf(data.traffic, 'blocked');
|
|
52
|
+
const formatX = period === '24h' ? formatHour : formatDate;
|
|
53
|
+
const formatTooltipX = period === '24h' ? formatHourWithTimezone : formatDateWithTimezone;
|
|
54
|
+
const attackTypes = ATTACK_TYPES.map(row => ({ ...row, value: row.value * data.scale }));
|
|
55
|
+
const attackTypesTotal = attackTypes.reduce((total, row) => total + row.value, 0);
|
|
56
|
+
const endpoints = TOP_ENDPOINTS.map(row => ({ ...row, value: row.value * data.scale }));
|
|
57
|
+
const endpointsMax = endpoints[0]?.value ?? 0;
|
|
58
|
+
const severity = SEVERITY.map((row, i) => ({ ...row, value: data.severity[i] ?? 0 }));
|
|
59
|
+
const threats = THREATS.map(row => ({ ...row, hits: row.hits * data.scale }));
|
|
60
|
+
|
|
61
|
+
const handlePeriodChange = (value: string) => setPeriod(value as Period);
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Page name='security-dashboard' fullSize data-testid='security-dashboard'>
|
|
65
|
+
<PageHeader>
|
|
66
|
+
<PageHeaderGroup className='flex-1'>
|
|
67
|
+
<PageTitle>Security dashboard</PageTitle>
|
|
68
|
+
<PageDescription>
|
|
69
|
+
Traffic, attacks and incidents across every application protected in this tenant.
|
|
70
|
+
</PageDescription>
|
|
71
|
+
</PageHeaderGroup>
|
|
72
|
+
<PageActions>
|
|
73
|
+
<Button
|
|
74
|
+
size='medium'
|
|
75
|
+
variant='outline'
|
|
76
|
+
color='neutral'
|
|
77
|
+
onClick={onExportReport}
|
|
78
|
+
data-testid='dashboard-export'
|
|
79
|
+
>
|
|
80
|
+
<Download />
|
|
81
|
+
Export report
|
|
82
|
+
</Button>
|
|
83
|
+
</PageActions>
|
|
84
|
+
</PageHeader>
|
|
85
|
+
|
|
86
|
+
<PageToolbar>
|
|
87
|
+
<SegmentedControl
|
|
88
|
+
value={period}
|
|
89
|
+
onChange={handlePeriodChange}
|
|
90
|
+
aria-label='Period'
|
|
91
|
+
data-testid='dashboard-period'
|
|
92
|
+
>
|
|
93
|
+
<SegmentedControlItem value='24h'>Last 24 hours</SegmentedControlItem>
|
|
94
|
+
<SegmentedControlItem value='7d'>7 days</SegmentedControlItem>
|
|
95
|
+
<SegmentedControlItem value='30d'>30 days</SegmentedControlItem>
|
|
96
|
+
</SegmentedControl>
|
|
97
|
+
</PageToolbar>
|
|
98
|
+
|
|
99
|
+
<PageContent>
|
|
100
|
+
<VStack gap={16} align='stretch'>
|
|
101
|
+
<div className='grid grid-cols-4 gap-16'>
|
|
102
|
+
<Chart data-testid='kpi-requests'>
|
|
103
|
+
<ChartHeader>
|
|
104
|
+
<ChartTitle>Requests</ChartTitle>
|
|
105
|
+
</ChartHeader>
|
|
106
|
+
<Metric>
|
|
107
|
+
<MetricHeader>
|
|
108
|
+
<MetricValue>{formatCompact(requests)}</MetricValue>
|
|
109
|
+
</MetricHeader>
|
|
110
|
+
<MetricCaption>All applications</MetricCaption>
|
|
111
|
+
</Metric>
|
|
112
|
+
<MetricSparkline
|
|
113
|
+
data={sparklineOf(data.traffic, 'requests')}
|
|
114
|
+
color='neutral'
|
|
115
|
+
label='Requests'
|
|
116
|
+
/>
|
|
117
|
+
</Chart>
|
|
118
|
+
|
|
119
|
+
<Chart data-testid='kpi-blocked'>
|
|
120
|
+
<ChartHeader>
|
|
121
|
+
<ChartTitle>Attacks blocked</ChartTitle>
|
|
122
|
+
</ChartHeader>
|
|
123
|
+
<Metric>
|
|
124
|
+
<MetricHeader>
|
|
125
|
+
<MetricValue>{blocked}</MetricValue>
|
|
126
|
+
<MetricTotal connector='of'>{attacks}</MetricTotal>
|
|
127
|
+
<MetricDelta value={data.blockedDelta} trend='up' sentiment='negative' />
|
|
128
|
+
</MetricHeader>
|
|
129
|
+
<MetricCaption>{data.caption}</MetricCaption>
|
|
130
|
+
</Metric>
|
|
131
|
+
<MetricSparkline
|
|
132
|
+
data={sparklineOf(data.traffic, 'blocked')}
|
|
133
|
+
color='negative'
|
|
134
|
+
label='Blocked'
|
|
135
|
+
/>
|
|
136
|
+
</Chart>
|
|
137
|
+
|
|
138
|
+
<Chart data-testid='kpi-incidents'>
|
|
139
|
+
<ChartHeader>
|
|
140
|
+
<ChartTitle>Open incidents</ChartTitle>
|
|
141
|
+
</ChartHeader>
|
|
142
|
+
<Metric>
|
|
143
|
+
<MetricHeader>
|
|
144
|
+
<MetricValue>{data.incidents}</MetricValue>
|
|
145
|
+
<MetricDelta
|
|
146
|
+
value={data.incidentsDelta}
|
|
147
|
+
sentiment={data.incidentsDelta < 0 ? 'positive' : 'negative'}
|
|
148
|
+
/>
|
|
149
|
+
</MetricHeader>
|
|
150
|
+
<MetricCaption>{data.caption}</MetricCaption>
|
|
151
|
+
</Metric>
|
|
152
|
+
<MetricSparkline data={INCIDENT_TREND} color='positive' label='Incidents' />
|
|
153
|
+
</Chart>
|
|
154
|
+
|
|
155
|
+
<Chart data-testid='kpi-endpoints'>
|
|
156
|
+
<ChartHeader>
|
|
157
|
+
<ChartTitle>API endpoints</ChartTitle>
|
|
158
|
+
</ChartHeader>
|
|
159
|
+
<Metric>
|
|
160
|
+
<MetricHeader>
|
|
161
|
+
<MetricValue>{data.endpoints}</MetricValue>
|
|
162
|
+
<MetricDelta value={data.newEndpoints} trend='up' sentiment='neutral' />
|
|
163
|
+
</MetricHeader>
|
|
164
|
+
<MetricCaption>New endpoints discovered</MetricCaption>
|
|
165
|
+
</Metric>
|
|
166
|
+
<MetricSparkline data={ENDPOINT_TREND} label='Endpoints' />
|
|
167
|
+
</Chart>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div className='grid grid-cols-2 gap-16'>
|
|
171
|
+
<Chart data-testid='traffic-chart'>
|
|
172
|
+
<ChartHeader>
|
|
173
|
+
<ChartTitle>Traffic</ChartTitle>
|
|
174
|
+
</ChartHeader>
|
|
175
|
+
<LineChart
|
|
176
|
+
data={data.traffic}
|
|
177
|
+
series={TRAFFIC_SERIES}
|
|
178
|
+
xKey='timestamp'
|
|
179
|
+
syncId='security-dashboard'
|
|
180
|
+
>
|
|
181
|
+
<LineChartLegend>
|
|
182
|
+
<LineChartLegendItem seriesKey='requests'>
|
|
183
|
+
<LineChartHoverPopoverDot color='brand' />
|
|
184
|
+
<Text size='xs'>Requests</Text>
|
|
185
|
+
</LineChartLegendItem>
|
|
186
|
+
</LineChartLegend>
|
|
187
|
+
<LineChartBody height={200}>
|
|
188
|
+
<LineChartGrid />
|
|
189
|
+
<LineChartXAxis tickFormatter={formatX} minTickGap={32} />
|
|
190
|
+
<LineChartYAxis tickFormatter={formatCompact} />
|
|
191
|
+
<LineChartLine seriesKey='requests' />
|
|
192
|
+
<LineChartTooltip xTickFormatter={formatTooltipX} />
|
|
193
|
+
</LineChartBody>
|
|
194
|
+
</LineChart>
|
|
195
|
+
</Chart>
|
|
196
|
+
|
|
197
|
+
<Chart data-testid='attacks-chart'>
|
|
198
|
+
<ChartHeader>
|
|
199
|
+
<ChartTitle>Attacks</ChartTitle>
|
|
200
|
+
</ChartHeader>
|
|
201
|
+
<LineChart
|
|
202
|
+
data={data.traffic}
|
|
203
|
+
series={ATTACK_SERIES}
|
|
204
|
+
xKey='timestamp'
|
|
205
|
+
syncId='security-dashboard'
|
|
206
|
+
>
|
|
207
|
+
<LineChartLegend>
|
|
208
|
+
<LineChartLegendItem seriesKey='attacks'>
|
|
209
|
+
<LineChartHoverPopoverDot color='red' />
|
|
210
|
+
<Text size='xs'>Attacks</Text>
|
|
211
|
+
</LineChartLegendItem>
|
|
212
|
+
<LineChartLegendItem seriesKey='blocked'>
|
|
213
|
+
<LineChartHoverPopoverDot color='green' />
|
|
214
|
+
<Text size='xs'>Blocked</Text>
|
|
215
|
+
</LineChartLegendItem>
|
|
216
|
+
</LineChartLegend>
|
|
217
|
+
<LineChartBody height={200}>
|
|
218
|
+
<LineChartGrid />
|
|
219
|
+
<LineChartXAxis tickFormatter={formatX} minTickGap={32} />
|
|
220
|
+
<LineChartYAxis tickFormatter={formatCompact} />
|
|
221
|
+
<LineChartLine seriesKey='attacks' />
|
|
222
|
+
<LineChartLine seriesKey='blocked' />
|
|
223
|
+
<LineChartTooltip xTickFormatter={formatTooltipX} />
|
|
224
|
+
</LineChartBody>
|
|
225
|
+
</LineChart>
|
|
226
|
+
</Chart>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div className='grid grid-cols-3 gap-16'>
|
|
230
|
+
<Chart data-testid='attack-types-chart'>
|
|
231
|
+
<ChartHeader>
|
|
232
|
+
<ChartTitle>Attack types</ChartTitle>
|
|
233
|
+
</ChartHeader>
|
|
234
|
+
<PieChart data={attackTypes} total={attackTypesTotal}>
|
|
235
|
+
<PieChartDonut>
|
|
236
|
+
<PieChartCenter>
|
|
237
|
+
<PieChartCenterValue formatHoveredValue={formatHoveredAttacks}>
|
|
238
|
+
{formatCompact(attackTypesTotal)}
|
|
239
|
+
</PieChartCenterValue>
|
|
240
|
+
<PieChartCenterLabel pluralize={{ one: 'attack', other: 'attacks' }} />
|
|
241
|
+
</PieChartCenter>
|
|
242
|
+
</PieChartDonut>
|
|
243
|
+
<PieChartLegend>
|
|
244
|
+
{attackTypes.map(row => (
|
|
245
|
+
<PieChartLegendItem key={row.name} name={row.name}>
|
|
246
|
+
<Text size='sm'>{row.label}</Text>
|
|
247
|
+
<PieChartLegendValue>
|
|
248
|
+
{formatFull(row.value)}
|
|
249
|
+
<LegendDot />
|
|
250
|
+
<PieChartLegendPercent />
|
|
251
|
+
</PieChartLegendValue>
|
|
252
|
+
</PieChartLegendItem>
|
|
253
|
+
))}
|
|
254
|
+
</PieChartLegend>
|
|
255
|
+
</PieChart>
|
|
256
|
+
</Chart>
|
|
257
|
+
|
|
258
|
+
<Chart data-testid='top-endpoints-chart'>
|
|
259
|
+
<ChartHeader>
|
|
260
|
+
<ChartTitle>Most attacked endpoints</ChartTitle>
|
|
261
|
+
<ChartActions>
|
|
262
|
+
<Button
|
|
263
|
+
variant='ghost'
|
|
264
|
+
color='neutral'
|
|
265
|
+
size='small'
|
|
266
|
+
aria-label='Open API inventory'
|
|
267
|
+
onClick={onOpenInventory}
|
|
268
|
+
>
|
|
269
|
+
<ExternalLink />
|
|
270
|
+
</Button>
|
|
271
|
+
</ChartActions>
|
|
272
|
+
</ChartHeader>
|
|
273
|
+
<BarList max={endpointsMax}>
|
|
274
|
+
{endpoints.map(row => (
|
|
275
|
+
<BarListItem key={row.path} value={row.value}>
|
|
276
|
+
<BarListBar color={row.color} />
|
|
277
|
+
<BarListLabel>{row.path}</BarListLabel>
|
|
278
|
+
<BarListValue>
|
|
279
|
+
{formatFull(row.value)}
|
|
280
|
+
<BarListPercent />
|
|
281
|
+
</BarListValue>
|
|
282
|
+
</BarListItem>
|
|
283
|
+
))}
|
|
284
|
+
</BarList>
|
|
285
|
+
</Chart>
|
|
286
|
+
|
|
287
|
+
<Chart data-testid='severity-chart'>
|
|
288
|
+
<ChartHeader>
|
|
289
|
+
<ChartTitle>Incidents by severity</ChartTitle>
|
|
290
|
+
</ChartHeader>
|
|
291
|
+
<HorizontalBarStack data={severity}>
|
|
292
|
+
<MetricHeader>
|
|
293
|
+
<MetricValue>{data.incidents}</MetricValue>
|
|
294
|
+
<MetricDelta
|
|
295
|
+
value={data.incidentsDelta}
|
|
296
|
+
sentiment={data.incidentsDelta < 0 ? 'positive' : 'negative'}
|
|
297
|
+
/>
|
|
298
|
+
</MetricHeader>
|
|
299
|
+
</HorizontalBarStack>
|
|
300
|
+
</Chart>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<VStack gap={12} align='stretch'>
|
|
304
|
+
<HStack justify='between' align='center'>
|
|
305
|
+
<Heading as='h2' size='lg' weight='medium'>
|
|
306
|
+
Top threats
|
|
307
|
+
</Heading>
|
|
308
|
+
<Button
|
|
309
|
+
variant='ghost'
|
|
310
|
+
color='neutral'
|
|
311
|
+
size='medium'
|
|
312
|
+
onClick={onOpenAttacks}
|
|
313
|
+
data-testid='threats-view-all'
|
|
314
|
+
>
|
|
315
|
+
View all attacks
|
|
316
|
+
<ArrowRight />
|
|
317
|
+
</Button>
|
|
318
|
+
</HStack>
|
|
319
|
+
<Table
|
|
320
|
+
aria-label='Top threats'
|
|
321
|
+
data={threats}
|
|
322
|
+
columns={THREAT_COLUMNS}
|
|
323
|
+
getRowId={getThreatId}
|
|
324
|
+
data-testid='threats-table'
|
|
325
|
+
/>
|
|
326
|
+
</VStack>
|
|
327
|
+
</VStack>
|
|
328
|
+
</PageContent>
|
|
329
|
+
</Page>
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
First load: each card swaps its body for its own skeleton under a real header.
|
|
335
|
+
|
|
336
|
+
First load. The header and period selector are real; every card swaps its body for the
|
|
337
|
+
chart's own skeleton (`MetricSkeleton`, `Skeleton` legend chips over a bare `LineChartEmpty`, `PieChartSkeleton`,
|
|
338
|
+
`BarListSkeleton`, `HorizontalBarStackSkeleton`) and the table shows skeleton rows.
|
|
339
|
+
|
|
340
|
+
```tsx story=Loading
|
|
341
|
+
import { Button } from '@wallarm-org/design-system/Button';
|
|
342
|
+
import { Heading } from '@wallarm-org/design-system/Heading';
|
|
343
|
+
import { Download } from '@wallarm-org/design-system/icons';
|
|
344
|
+
import { Page, PageActions, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
|
|
345
|
+
import { SegmentedControl, SegmentedControlItem } from '@wallarm-org/design-system/SegmentedControl';
|
|
346
|
+
import { BarListSkeleton, Chart, ChartHeader, ChartTitle, HorizontalBarStackSkeleton, LineChartEmpty, LineChartLegend, LineChartLegendItem, MetricSkeleton, PieChartSkeleton } from '@wallarm-org/design-system/SimpleCharts';
|
|
347
|
+
import { Skeleton } from '@wallarm-org/design-system/Skeleton';
|
|
348
|
+
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
|
|
349
|
+
import { Table } from '@wallarm-org/design-system/Table';
|
|
350
|
+
|
|
351
|
+
export const Loading = () => (
|
|
352
|
+
<Page name='security-dashboard' fullSize data-testid='security-dashboard'>
|
|
353
|
+
<PageHeader>
|
|
354
|
+
<PageHeaderGroup className='flex-1'>
|
|
355
|
+
<PageTitle>Security dashboard</PageTitle>
|
|
356
|
+
<PageDescription>
|
|
357
|
+
Traffic, attacks and incidents across every application protected in this tenant.
|
|
358
|
+
</PageDescription>
|
|
359
|
+
</PageHeaderGroup>
|
|
360
|
+
<PageActions>
|
|
361
|
+
<Button size='medium' variant='outline' color='neutral' disabled>
|
|
362
|
+
<Download />
|
|
363
|
+
Export report
|
|
364
|
+
</Button>
|
|
365
|
+
</PageActions>
|
|
366
|
+
</PageHeader>
|
|
367
|
+
|
|
368
|
+
<PageToolbar>
|
|
369
|
+
<SegmentedControl value='24h' aria-label='Period' data-testid='dashboard-period'>
|
|
370
|
+
<SegmentedControlItem value='24h'>Last 24 hours</SegmentedControlItem>
|
|
371
|
+
<SegmentedControlItem value='7d'>7 days</SegmentedControlItem>
|
|
372
|
+
<SegmentedControlItem value='30d'>30 days</SegmentedControlItem>
|
|
373
|
+
</SegmentedControl>
|
|
374
|
+
</PageToolbar>
|
|
375
|
+
|
|
376
|
+
<PageContent>
|
|
377
|
+
<VStack gap={16} align='stretch'>
|
|
378
|
+
<div className='grid grid-cols-4 gap-16'>
|
|
379
|
+
<Chart aria-busy='true' data-testid='kpi-requests'>
|
|
380
|
+
<ChartHeader>
|
|
381
|
+
<ChartTitle>Requests</ChartTitle>
|
|
382
|
+
</ChartHeader>
|
|
383
|
+
<MetricSkeleton />
|
|
384
|
+
</Chart>
|
|
385
|
+
<Chart aria-busy='true' data-testid='kpi-blocked'>
|
|
386
|
+
<ChartHeader>
|
|
387
|
+
<ChartTitle>Attacks blocked</ChartTitle>
|
|
388
|
+
</ChartHeader>
|
|
389
|
+
<MetricSkeleton />
|
|
390
|
+
</Chart>
|
|
391
|
+
<Chart aria-busy='true' data-testid='kpi-incidents'>
|
|
392
|
+
<ChartHeader>
|
|
393
|
+
<ChartTitle>Open incidents</ChartTitle>
|
|
394
|
+
</ChartHeader>
|
|
395
|
+
<MetricSkeleton />
|
|
396
|
+
</Chart>
|
|
397
|
+
<Chart aria-busy='true' data-testid='kpi-endpoints'>
|
|
398
|
+
<ChartHeader>
|
|
399
|
+
<ChartTitle>API endpoints</ChartTitle>
|
|
400
|
+
</ChartHeader>
|
|
401
|
+
<MetricSkeleton />
|
|
402
|
+
</Chart>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<div className='grid grid-cols-2 gap-16'>
|
|
406
|
+
<Chart aria-busy='true' data-testid='traffic-chart'>
|
|
407
|
+
<ChartHeader>
|
|
408
|
+
<ChartTitle>Traffic</ChartTitle>
|
|
409
|
+
</ChartHeader>
|
|
410
|
+
<LineChartLegend>
|
|
411
|
+
<LineChartLegendItem seriesKey='skeleton-requests'>
|
|
412
|
+
<Skeleton width='72px' height='16px' rounded={4} />
|
|
413
|
+
</LineChartLegendItem>
|
|
414
|
+
</LineChartLegend>
|
|
415
|
+
<LineChartEmpty height={200} />
|
|
416
|
+
</Chart>
|
|
417
|
+
<Chart aria-busy='true' data-testid='attacks-chart'>
|
|
418
|
+
<ChartHeader>
|
|
419
|
+
<ChartTitle>Attacks</ChartTitle>
|
|
420
|
+
</ChartHeader>
|
|
421
|
+
<LineChartLegend>
|
|
422
|
+
<LineChartLegendItem seriesKey='skeleton-attacks'>
|
|
423
|
+
<Skeleton width='72px' height='16px' rounded={4} />
|
|
424
|
+
</LineChartLegendItem>
|
|
425
|
+
<LineChartLegendItem seriesKey='skeleton-blocked'>
|
|
426
|
+
<Skeleton width='72px' height='16px' rounded={4} />
|
|
427
|
+
</LineChartLegendItem>
|
|
428
|
+
</LineChartLegend>
|
|
429
|
+
<LineChartEmpty height={200} />
|
|
430
|
+
</Chart>
|
|
431
|
+
</div>
|
|
432
|
+
|
|
433
|
+
<div className='grid grid-cols-3 gap-16'>
|
|
434
|
+
<Chart aria-busy='true' data-testid='attack-types-chart'>
|
|
435
|
+
<ChartHeader>
|
|
436
|
+
<ChartTitle>Attack types</ChartTitle>
|
|
437
|
+
</ChartHeader>
|
|
438
|
+
<PieChartSkeleton rows={5} />
|
|
439
|
+
</Chart>
|
|
440
|
+
<Chart aria-busy='true' data-testid='top-endpoints-chart'>
|
|
441
|
+
<ChartHeader>
|
|
442
|
+
<ChartTitle>Most attacked endpoints</ChartTitle>
|
|
443
|
+
</ChartHeader>
|
|
444
|
+
<BarListSkeleton rows={5} />
|
|
445
|
+
</Chart>
|
|
446
|
+
<Chart aria-busy='true' data-testid='severity-chart'>
|
|
447
|
+
<ChartHeader>
|
|
448
|
+
<ChartTitle>Incidents by severity</ChartTitle>
|
|
449
|
+
</ChartHeader>
|
|
450
|
+
<HorizontalBarStackSkeleton />
|
|
451
|
+
</Chart>
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<VStack gap={12} align='stretch'>
|
|
455
|
+
<HStack justify='between' align='center'>
|
|
456
|
+
<Heading as='h2' size='lg' weight='medium'>
|
|
457
|
+
Top threats
|
|
458
|
+
</Heading>
|
|
459
|
+
</HStack>
|
|
460
|
+
<Table
|
|
461
|
+
aria-label='Top threats'
|
|
462
|
+
data={[]}
|
|
463
|
+
columns={THREAT_COLUMNS}
|
|
464
|
+
getRowId={getThreatId}
|
|
465
|
+
isLoading
|
|
466
|
+
skeletonCount={5}
|
|
467
|
+
data-testid='threats-table'
|
|
468
|
+
/>
|
|
469
|
+
</VStack>
|
|
470
|
+
</VStack>
|
|
471
|
+
</PageContent>
|
|
472
|
+
</Page>
|
|
473
|
+
);
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
A tenant with no traffic yet: one alert with the setup action, every card says why it is empty.
|
|
477
|
+
|
|
478
|
+
A new tenant with no traffic yet. One alert carries the only action (set up a node);
|
|
479
|
+
KPIs show the em dash, each chart card says why it is empty, and the table explains what
|
|
480
|
+
will appear there.
|
|
481
|
+
|
|
482
|
+
```tsx story=NoData
|
|
483
|
+
import { Alert, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle } from '@wallarm-org/design-system/Alert';
|
|
484
|
+
import { Button } from '@wallarm-org/design-system/Button';
|
|
485
|
+
import { EmptyState, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
|
|
486
|
+
import { Heading } from '@wallarm-org/design-system/Heading';
|
|
487
|
+
import { ShieldCheck } from '@wallarm-org/design-system/icons';
|
|
488
|
+
import { Page, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
|
|
489
|
+
import { SegmentedControl, SegmentedControlItem } from '@wallarm-org/design-system/SegmentedControl';
|
|
490
|
+
import { Chart, ChartHeader, ChartTitle, LineChartEmpty, Metric, MetricCaption, MetricHeader, MetricValue } from '@wallarm-org/design-system/SimpleCharts';
|
|
491
|
+
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
|
|
492
|
+
import { Table, TableEmptyState } from '@wallarm-org/design-system/Table';
|
|
493
|
+
|
|
494
|
+
export const NoData = () => (
|
|
495
|
+
<Page name='security-dashboard' fullSize data-testid='security-dashboard'>
|
|
496
|
+
<PageHeader>
|
|
497
|
+
<PageHeaderGroup className='flex-1'>
|
|
498
|
+
<PageTitle>Security dashboard</PageTitle>
|
|
499
|
+
<PageDescription>
|
|
500
|
+
Traffic, attacks and incidents across every application protected in this tenant.
|
|
501
|
+
</PageDescription>
|
|
502
|
+
</PageHeaderGroup>
|
|
503
|
+
</PageHeader>
|
|
504
|
+
|
|
505
|
+
<PageToolbar>
|
|
506
|
+
<SegmentedControl defaultValue='24h' aria-label='Period' data-testid='dashboard-period'>
|
|
507
|
+
<SegmentedControlItem value='24h'>Last 24 hours</SegmentedControlItem>
|
|
508
|
+
<SegmentedControlItem value='7d'>7 days</SegmentedControlItem>
|
|
509
|
+
<SegmentedControlItem value='30d'>30 days</SegmentedControlItem>
|
|
510
|
+
</SegmentedControl>
|
|
511
|
+
</PageToolbar>
|
|
512
|
+
|
|
513
|
+
<PageContent>
|
|
514
|
+
<VStack gap={16} align='stretch'>
|
|
515
|
+
<Alert color='info' data-testid='dashboard-no-node'>
|
|
516
|
+
<AlertIcon />
|
|
517
|
+
<AlertContent>
|
|
518
|
+
<AlertTitle>No filtering node is sending traffic</AlertTitle>
|
|
519
|
+
<AlertDescription>
|
|
520
|
+
Deploy a node in front of your applications and the dashboard fills in within a few
|
|
521
|
+
minutes.
|
|
522
|
+
</AlertDescription>
|
|
523
|
+
</AlertContent>
|
|
524
|
+
<AlertControls>
|
|
525
|
+
<Button
|
|
526
|
+
variant='secondary'
|
|
527
|
+
color='neutral'
|
|
528
|
+
size='small'
|
|
529
|
+
onClick={onSetUpNode}
|
|
530
|
+
data-testid='dashboard-set-up-node'
|
|
531
|
+
>
|
|
532
|
+
Set up a node
|
|
533
|
+
</Button>
|
|
534
|
+
</AlertControls>
|
|
535
|
+
</Alert>
|
|
536
|
+
|
|
537
|
+
<div className='grid grid-cols-4 gap-16'>
|
|
538
|
+
<Chart data-testid='kpi-requests'>
|
|
539
|
+
<ChartHeader>
|
|
540
|
+
<ChartTitle>Requests</ChartTitle>
|
|
541
|
+
</ChartHeader>
|
|
542
|
+
<Metric>
|
|
543
|
+
<MetricHeader>
|
|
544
|
+
<MetricValue>—</MetricValue>
|
|
545
|
+
</MetricHeader>
|
|
546
|
+
<MetricCaption>All applications</MetricCaption>
|
|
547
|
+
</Metric>
|
|
548
|
+
</Chart>
|
|
549
|
+
<Chart data-testid='kpi-blocked'>
|
|
550
|
+
<ChartHeader>
|
|
551
|
+
<ChartTitle>Attacks blocked</ChartTitle>
|
|
552
|
+
</ChartHeader>
|
|
553
|
+
<Metric>
|
|
554
|
+
<MetricHeader>
|
|
555
|
+
<MetricValue>—</MetricValue>
|
|
556
|
+
</MetricHeader>
|
|
557
|
+
<MetricCaption>vs previous 24 hours</MetricCaption>
|
|
558
|
+
</Metric>
|
|
559
|
+
</Chart>
|
|
560
|
+
<Chart data-testid='kpi-incidents'>
|
|
561
|
+
<ChartHeader>
|
|
562
|
+
<ChartTitle>Open incidents</ChartTitle>
|
|
563
|
+
</ChartHeader>
|
|
564
|
+
<Metric>
|
|
565
|
+
<MetricHeader>
|
|
566
|
+
<MetricValue>—</MetricValue>
|
|
567
|
+
</MetricHeader>
|
|
568
|
+
<MetricCaption>vs previous 24 hours</MetricCaption>
|
|
569
|
+
</Metric>
|
|
570
|
+
</Chart>
|
|
571
|
+
<Chart data-testid='kpi-endpoints'>
|
|
572
|
+
<ChartHeader>
|
|
573
|
+
<ChartTitle>API endpoints</ChartTitle>
|
|
574
|
+
</ChartHeader>
|
|
575
|
+
<Metric>
|
|
576
|
+
<MetricHeader>
|
|
577
|
+
<MetricValue>—</MetricValue>
|
|
578
|
+
</MetricHeader>
|
|
579
|
+
<MetricCaption>New endpoints discovered</MetricCaption>
|
|
580
|
+
</Metric>
|
|
581
|
+
</Chart>
|
|
582
|
+
</div>
|
|
583
|
+
|
|
584
|
+
<div className='grid grid-cols-2 gap-16'>
|
|
585
|
+
<Chart data-testid='traffic-chart'>
|
|
586
|
+
<ChartHeader>
|
|
587
|
+
<ChartTitle>Traffic</ChartTitle>
|
|
588
|
+
</ChartHeader>
|
|
589
|
+
<LineChartEmpty height={200}>No requests in this period</LineChartEmpty>
|
|
590
|
+
</Chart>
|
|
591
|
+
<Chart data-testid='attacks-chart'>
|
|
592
|
+
<ChartHeader>
|
|
593
|
+
<ChartTitle>Attacks</ChartTitle>
|
|
594
|
+
</ChartHeader>
|
|
595
|
+
<LineChartEmpty height={200}>No attacks in this period</LineChartEmpty>
|
|
596
|
+
</Chart>
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
<div className='grid grid-cols-3 gap-16'>
|
|
600
|
+
<Chart data-testid='attack-types-chart'>
|
|
601
|
+
<ChartHeader>
|
|
602
|
+
<ChartTitle>Attack types</ChartTitle>
|
|
603
|
+
</ChartHeader>
|
|
604
|
+
<div className='flex flex-1 items-center justify-center'>
|
|
605
|
+
<EmptyState type='no-results'>
|
|
606
|
+
<EmptyStateMessage>
|
|
607
|
+
<EmptyStateDescription>
|
|
608
|
+
Attack types appear once attacks are detected.
|
|
609
|
+
</EmptyStateDescription>
|
|
610
|
+
</EmptyStateMessage>
|
|
611
|
+
</EmptyState>
|
|
612
|
+
</div>
|
|
613
|
+
</Chart>
|
|
614
|
+
<Chart data-testid='top-endpoints-chart'>
|
|
615
|
+
<ChartHeader>
|
|
616
|
+
<ChartTitle>Most attacked endpoints</ChartTitle>
|
|
617
|
+
</ChartHeader>
|
|
618
|
+
<div className='flex flex-1 items-center justify-center'>
|
|
619
|
+
<EmptyState type='no-results'>
|
|
620
|
+
<EmptyStateMessage>
|
|
621
|
+
<EmptyStateDescription>
|
|
622
|
+
Endpoints are ranked once traffic is analyzed.
|
|
623
|
+
</EmptyStateDescription>
|
|
624
|
+
</EmptyStateMessage>
|
|
625
|
+
</EmptyState>
|
|
626
|
+
</div>
|
|
627
|
+
</Chart>
|
|
628
|
+
<Chart data-testid='severity-chart'>
|
|
629
|
+
<ChartHeader>
|
|
630
|
+
<ChartTitle>Incidents by severity</ChartTitle>
|
|
631
|
+
</ChartHeader>
|
|
632
|
+
<div className='flex flex-1 items-center justify-center'>
|
|
633
|
+
<EmptyState type='no-results'>
|
|
634
|
+
<EmptyStateMessage>
|
|
635
|
+
<EmptyStateDescription>No incidents have been opened.</EmptyStateDescription>
|
|
636
|
+
</EmptyStateMessage>
|
|
637
|
+
</EmptyState>
|
|
638
|
+
</div>
|
|
639
|
+
</Chart>
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
<VStack gap={12} align='stretch'>
|
|
643
|
+
<HStack justify='between' align='center'>
|
|
644
|
+
<Heading as='h2' size='lg' weight='medium'>
|
|
645
|
+
Top threats
|
|
646
|
+
</Heading>
|
|
647
|
+
</HStack>
|
|
648
|
+
<Table
|
|
649
|
+
aria-label='Top threats'
|
|
650
|
+
data={[]}
|
|
651
|
+
columns={THREAT_COLUMNS}
|
|
652
|
+
getRowId={getThreatId}
|
|
653
|
+
data-testid='threats-table'
|
|
654
|
+
>
|
|
655
|
+
<TableEmptyState>
|
|
656
|
+
<EmptyState type='collection-empty' data-testid='threats-empty'>
|
|
657
|
+
<EmptyStateIllustration>
|
|
658
|
+
<ShieldCheck />
|
|
659
|
+
</EmptyStateIllustration>
|
|
660
|
+
<EmptyStateMessage>
|
|
661
|
+
<EmptyStateTitle>No threats detected</EmptyStateTitle>
|
|
662
|
+
<EmptyStateDescription>
|
|
663
|
+
Attacks on your applications are listed here, ranked by hits.
|
|
664
|
+
</EmptyStateDescription>
|
|
665
|
+
</EmptyStateMessage>
|
|
666
|
+
</EmptyState>
|
|
667
|
+
</TableEmptyState>
|
|
668
|
+
</Table>
|
|
669
|
+
</VStack>
|
|
670
|
+
</VStack>
|
|
671
|
+
</PageContent>
|
|
672
|
+
</Page>
|
|
673
|
+
);
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
## Related
|
|
677
|
+
|
|
678
|
+
- [Resource list page](../patterns/resource-list-page.md)
|
|
679
|
+
- [Entity table](../patterns/entity-table.md)
|
|
680
|
+
- [Empty states](../patterns/empty-states.md)
|
|
681
|
+
- [Application layout](../patterns/app-layout.md)
|