@kb-labs/studio-app 0.7.0 → 2.9.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/index.html +1 -0
- package/dist/main.80b70197.css +2 -0
- package/dist/main.80b70197.css.map +1 -0
- package/dist/main.ad42ef4a.js +522 -0
- package/dist/main.ad42ef4a.js.map +1 -0
- package/dist/mf-manifest.json +241 -0
- package/dist/mf-stats.json +271 -0
- package/package.json +56 -39
- package/server.js +68 -0
- package/.env.example +0 -10
- package/UI-KIT-COMPONENTS.md +0 -783
- package/UI-KIT-PLAN.md +0 -326
- package/eslint-rules/no-direct-antd-import.js +0 -151
- package/eslint.config.ts +0 -27
- package/index.html +0 -17
- package/postcss.config.js +0 -7
- package/public/favicon.ico +0 -0
- package/rspack.config.mjs +0 -118
- package/src/App.tsx +0 -46
- package/src/components/devtools/devtools-log-feed.module.css +0 -165
- package/src/components/devtools/devtools-log-feed.tsx +0 -300
- package/src/components/devtools/devtools-panel.module.css +0 -121
- package/src/components/devtools/devtools-panel.tsx +0 -115
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -210
- package/src/components/health-banner.module.css +0 -103
- package/src/components/health-banner.tsx +0 -134
- package/src/components/health-indicator.tsx +0 -12
- package/src/components/page-header.tsx +0 -49
- package/src/components/page-transition.tsx +0 -24
- package/src/components/role-switcher.tsx +0 -148
- package/src/components/run-badge.tsx +0 -13
- package/src/components/ui/icons.tsx +0 -509
- package/src/components/ui/index.ts +0 -25
- package/src/components/ui/kb-config-provider.tsx +0 -130
- package/src/components/ui/kb-header.module.css +0 -51
- package/src/components/ui/kb-header.tsx +0 -112
- package/src/components/ui/kb-notification-bell.module.css +0 -103
- package/src/components/ui/kb-notification-bell.tsx +0 -199
- package/src/components/ui/kb-page-layout.tsx +0 -66
- package/src/components/ui/kb-quick-search.module.css +0 -86
- package/src/components/ui/kb-quick-search.tsx +0 -196
- package/src/components/ui/kb-sidebar.module.css +0 -47
- package/src/components/ui/kb-sidebar.tsx +0 -196
- package/src/components/ui/kb-stat-card.module.css +0 -21
- package/src/components/ui/kb-stat-card.tsx +0 -22
- package/src/components/ui/kb-stat-grid.tsx +0 -22
- package/src/components/ui/kb-status-bar.module.css +0 -49
- package/src/components/ui/kb-status-bar.tsx +0 -145
- package/src/components/ui/kb-system-health-indicator.tsx +0 -229
- package/src/components/ui/kb-theme-toggle.tsx +0 -42
- package/src/components/ui/theme-adapter.ts +0 -812
- package/src/components/ui/theme-transition-overlay.tsx +0 -70
- package/src/components/ui/utils.ts +0 -6
- package/src/components/widget-error-boundary.tsx +0 -172
- package/src/config/env.ts +0 -5
- package/src/config/feature-flags.ts +0 -482
- package/src/config/studio.config.schema.ts +0 -88
- package/src/config/studio.config.ts +0 -84
- package/src/env.d.ts +0 -23
- package/src/hooks/use-command-palette.ts +0 -6
- package/src/hooks/use-devtools-store.ts +0 -25
- package/src/hooks/use-feature-flags.ts +0 -101
- package/src/index.css +0 -10
- package/src/layouts/dashboard-grid.tsx +0 -122
- package/src/layouts/index.ts +0 -12
- package/src/layouts/two-pane.tsx +0 -134
- package/src/main.tsx +0 -15
- package/src/modules/analytics/components/analytics-daily-stats-chart.tsx +0 -257
- package/src/modules/analytics/components/analytics-date-range-picker.tsx +0 -121
- package/src/modules/analytics/pages/analytics-cache-page.tsx +0 -285
- package/src/modules/analytics/pages/analytics-embeddings-page.tsx +0 -274
- package/src/modules/analytics/pages/analytics-events-page.tsx +0 -425
- package/src/modules/analytics/pages/analytics-llm-page.tsx +0 -434
- package/src/modules/analytics/pages/analytics-overview-page.tsx +0 -336
- package/src/modules/analytics/pages/analytics-page.tsx +0 -20
- package/src/modules/analytics/pages/analytics-storage-page.tsx +0 -344
- package/src/modules/analytics/pages/analytics-vectorstore-page.tsx +0 -279
- package/src/modules/analytics/routes/index.tsx +0 -133
- package/src/modules/analytics/utils/formatters.test.ts +0 -148
- package/src/modules/analytics/utils/formatters.ts +0 -100
- package/src/modules/auth/pages/login-page.module.css +0 -113
- package/src/modules/auth/pages/login-page.tsx +0 -80
- package/src/modules/auth/routes/index.tsx +0 -24
- package/src/modules/dashboard/components/ActivityTimelineWidget.tsx +0 -199
- package/src/modules/dashboard/components/AiInsightsWidget.tsx +0 -358
- package/src/modules/dashboard/components/AnimatedMetricCard.css +0 -88
- package/src/modules/dashboard/components/AnimatedMetricCard.tsx +0 -125
- package/src/modules/dashboard/components/HeroMetricCard.css +0 -114
- package/src/modules/dashboard/components/HeroMetricCard.tsx +0 -152
- package/src/modules/dashboard/components/HeroMetricsWidget.tsx +0 -146
- package/src/modules/dashboard/components/SystemResourcesWidget.tsx +0 -197
- package/src/modules/dashboard/components/dashboard-empty.tsx +0 -22
- package/src/modules/dashboard/components/dashboard-kpis-widget.tsx +0 -59
- package/src/modules/dashboard/components/dashboard-kpis.tsx +0 -13
- package/src/modules/dashboard/components/dashboard-latency-percentiles-widget.tsx +0 -85
- package/src/modules/dashboard/components/dashboard-metrics-widget.tsx +0 -78
- package/src/modules/dashboard/components/dashboard-plugins-widget.tsx +0 -67
- package/src/modules/dashboard/components/dashboard-requests-widget.tsx +0 -62
- package/src/modules/dashboard/layouts/dashboard-layout.tsx +0 -16
- package/src/modules/dashboard/pages/ai-insights-page.tsx +0 -563
- package/src/modules/dashboard/pages/dashboard-animations.css +0 -317
- package/src/modules/dashboard/pages/dashboard-page.tsx +0 -13
- package/src/modules/dashboard/routes/index.tsx +0 -70
- package/src/modules/observability/pages/devkit-page.tsx +0 -263
- package/src/modules/observability/pages/incident-detail-page.tsx +0 -571
- package/src/modules/observability/pages/incidents-page.tsx +0 -370
- package/src/modules/observability/pages/log-detail-page.tsx +0 -508
- package/src/modules/observability/pages/logs-page.tsx +0 -1129
- package/src/modules/observability/pages/prometheus-metrics-page.tsx +0 -486
- package/src/modules/observability/pages/state-broker-page.tsx +0 -229
- package/src/modules/observability/pages/system-events-page.tsx +0 -255
- package/src/modules/observability/routes/index.tsx +0 -133
- package/src/modules/plugins/components/marketplace-card.tsx +0 -153
- package/src/modules/plugins/components/plugin-ai-assistant-modal.tsx +0 -374
- package/src/modules/plugins/components/plugin-card.tsx +0 -136
- package/src/modules/plugins/components/plugin-detail/capabilities-summary.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/cli-commands-table.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/index.ts +0 -7
- package/src/modules/plugins/components/plugin-detail/jobs-table.tsx +0 -64
- package/src/modules/plugins/components/plugin-detail/permissions/env-permissions.tsx +0 -30
- package/src/modules/plugins/components/plugin-detail/permissions/filesystem-permissions.tsx +0 -68
- package/src/modules/plugins/components/plugin-detail/permissions/index.ts +0 -6
- package/src/modules/plugins/components/plugin-detail/permissions/network-permissions.tsx +0 -43
- package/src/modules/plugins/components/plugin-detail/permissions/platform-services.tsx +0 -242
- package/src/modules/plugins/components/plugin-detail/permissions/resource-quotas.tsx +0 -96
- package/src/modules/plugins/components/plugin-detail/permissions/shell-permissions.tsx +0 -55
- package/src/modules/plugins/components/plugin-detail/permissions-view.tsx +0 -47
- package/src/modules/plugins/components/plugin-detail/plugin-header.tsx +0 -169
- package/src/modules/plugins/components/plugin-detail/rest-routes-table.tsx +0 -159
- package/src/modules/plugins/components/plugin-detail/workflows-table.tsx +0 -40
- package/src/modules/plugins/components/plugin-grid.tsx +0 -20
- package/src/modules/plugins/components/plugin-table.tsx +0 -178
- package/src/modules/plugins/pages/marketplace-page.tsx +0 -200
- package/src/modules/plugins/pages/plugin-detail-page.tsx +0 -1145
- package/src/modules/plugins/routes/index.tsx +0 -48
- package/src/modules/plugins/utils/index.ts +0 -1
- package/src/modules/plugins/utils/schema-helpers.ts +0 -21
- package/src/modules/settings/components/api-routes-viewer.tsx +0 -415
- package/src/modules/settings/components/appearance-settings.tsx +0 -200
- package/src/modules/settings/components/configuration-settings.tsx +0 -321
- package/src/modules/settings/components/data-privacy-settings.tsx +0 -111
- package/src/modules/settings/components/experimental-settings.tsx +0 -243
- package/src/modules/settings/components/navigation-settings.tsx +0 -198
- package/src/modules/settings/components/notifications-settings.tsx +0 -40
- package/src/modules/settings/pages/settings-page.tsx +0 -298
- package/src/modules/settings/routes/index.tsx +0 -47
- package/src/pages/README-assistant.md +0 -91
- package/src/pages/login-page.tsx +0 -177
- package/src/pages/not-found-page.tsx +0 -85
- package/src/providers/auth-provider.tsx +0 -40
- package/src/providers/command-palette-provider.tsx +0 -193
- package/src/providers/data-sources-provider.tsx +0 -27
- package/src/providers/devtools-provider.tsx +0 -72
- package/src/providers/navigation-items-provider.tsx +0 -38
- package/src/providers/registry-v2-provider.tsx +0 -93
- package/src/providers/settings-provider.tsx +0 -158
- package/src/router.tsx +0 -302
- package/src/routes/helpers.tsx +0 -25
- package/src/routes/plugin-page-v2.tsx +0 -52
- package/src/routes/types.ts +0 -18
- package/src/styles/antd-overrides.css +0 -211
- package/src/styles/base.css +0 -190
- package/src/styles/settings.css +0 -75
- package/src/styles/variables.css +0 -94
- package/src/utils/analytics.ts +0 -183
- package/src/utils/apply-navigation-categories.ts +0 -83
- package/src/utils/commands.ts +0 -252
- package/src/utils/export.ts +0 -174
- package/src/utils/format-date.ts +0 -166
- package/src/utils/logger.ts +0 -110
- package/tailwind.config.ts +0 -13
- package/tsconfig.json +0 -13
- package/vitest-setup.ts +0 -1
- /package/{public → dist}/favicon.svg +0 -0
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { useNavigate } from 'react-router-dom';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
import {
|
|
5
|
-
UICard,
|
|
6
|
-
UIAlert,
|
|
7
|
-
UIBadge,
|
|
8
|
-
UITag,
|
|
9
|
-
UIRow,
|
|
10
|
-
UICol,
|
|
11
|
-
UIStatistic,
|
|
12
|
-
UITable,
|
|
13
|
-
UISelect,
|
|
14
|
-
UIButton,
|
|
15
|
-
UISpace,
|
|
16
|
-
UITooltip,
|
|
17
|
-
UIIcon,
|
|
18
|
-
} from '@kb-labs/studio-ui-kit';
|
|
19
|
-
import type {
|
|
20
|
-
Incident,
|
|
21
|
-
IncidentQuery,
|
|
22
|
-
IncidentSeverity,
|
|
23
|
-
IncidentType,
|
|
24
|
-
IncidentsListResponse,
|
|
25
|
-
} from '@kb-labs/studio-data-client';
|
|
26
|
-
import { useDataSources } from '../../../providers/data-sources-provider';
|
|
27
|
-
import dayjs from 'dayjs';
|
|
28
|
-
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
29
|
-
import { UIPage, UIPageHeader } from '@kb-labs/studio-ui-kit';
|
|
30
|
-
|
|
31
|
-
dayjs.extend(relativeTime);
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Format timestamp to human-readable string
|
|
35
|
-
*/
|
|
36
|
-
function formatTime(timestamp: number): string {
|
|
37
|
-
return dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Format duration between timestamps
|
|
42
|
-
*/
|
|
43
|
-
function formatDuration(from: number, to: number): string {
|
|
44
|
-
const durationMs = to - from;
|
|
45
|
-
const minutes = Math.floor(durationMs / 60000);
|
|
46
|
-
const hours = Math.floor(minutes / 60);
|
|
47
|
-
const days = Math.floor(hours / 24);
|
|
48
|
-
|
|
49
|
-
if (days > 0) {return `${days}d ${hours % 24}h`;}
|
|
50
|
-
if (hours > 0) {return `${hours}h ${minutes % 60}m`;}
|
|
51
|
-
return `${minutes}m`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Get severity icon and color
|
|
56
|
-
*/
|
|
57
|
-
function getSeverityConfig(severity: IncidentSeverity): { icon: React.ReactElement; color: string } {
|
|
58
|
-
switch (severity) {
|
|
59
|
-
case 'critical':
|
|
60
|
-
return { icon: <UIIcon name="FireOutlined" />, color: '#ff4d4f' };
|
|
61
|
-
case 'warning':
|
|
62
|
-
return { icon: <UIIcon name="WarningOutlined" />, color: '#faad14' };
|
|
63
|
-
case 'info':
|
|
64
|
-
return { icon: <UIIcon name="InfoCircleOutlined" />, color: '#1890ff' };
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Get incident type label
|
|
70
|
-
*/
|
|
71
|
-
function getTypeLabel(type: IncidentType): string {
|
|
72
|
-
switch (type) {
|
|
73
|
-
case 'error_rate':
|
|
74
|
-
return 'Error Rate';
|
|
75
|
-
case 'latency_spike':
|
|
76
|
-
return 'Latency Spike';
|
|
77
|
-
case 'plugin_failure':
|
|
78
|
-
return 'Plugin Failure';
|
|
79
|
-
case 'adapter_failure':
|
|
80
|
-
return 'Adapter Failure';
|
|
81
|
-
case 'system_health':
|
|
82
|
-
return 'System Health';
|
|
83
|
-
case 'custom':
|
|
84
|
-
return 'Custom';
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Incidents Management Page
|
|
90
|
-
*
|
|
91
|
-
* Shows all incidents with filters and summary statistics
|
|
92
|
-
*/
|
|
93
|
-
export function IncidentsPage() {
|
|
94
|
-
const navigate = useNavigate();
|
|
95
|
-
const sources = useDataSources();
|
|
96
|
-
const [filters, setFilters] = useState<IncidentQuery>({
|
|
97
|
-
limit: 50,
|
|
98
|
-
includeResolved: false,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// Fetch incidents list
|
|
102
|
-
const {
|
|
103
|
-
data,
|
|
104
|
-
isLoading,
|
|
105
|
-
error,
|
|
106
|
-
refetch,
|
|
107
|
-
} = useQuery<IncidentsListResponse>({
|
|
108
|
-
queryKey: ['incidents', 'list', filters],
|
|
109
|
-
queryFn: async () => {
|
|
110
|
-
return sources.observability.listIncidents(filters);
|
|
111
|
-
},
|
|
112
|
-
refetchInterval: 30000, // Auto-refresh every 30s
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const incidents = data?.data?.incidents ?? [];
|
|
116
|
-
const summary = data?.data?.summary;
|
|
117
|
-
|
|
118
|
-
// Handle filter changes
|
|
119
|
-
const handleSeverityChange = (value: string | number | (string | number)[]) => {
|
|
120
|
-
setFilters({ ...filters, severity: (value as IncidentSeverity) || undefined });
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
const handleTypeChange = (value: string | number | (string | number)[]) => {
|
|
124
|
-
setFilters({ ...filters, type: (value as IncidentType) || undefined });
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const handleIncludeResolvedChange = (value: string | number | (string | number)[]) => {
|
|
128
|
-
setFilters({ ...filters, includeResolved: value === 'true' });
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const handleViewIncident = (id: string) => {
|
|
132
|
-
navigate(`/observability/incidents/${id}`);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// Table columns
|
|
136
|
-
const columns = [
|
|
137
|
-
{
|
|
138
|
-
title: 'Severity',
|
|
139
|
-
dataIndex: 'severity',
|
|
140
|
-
key: 'severity',
|
|
141
|
-
width: 100,
|
|
142
|
-
render: (severity: IncidentSeverity) => {
|
|
143
|
-
const config = getSeverityConfig(severity);
|
|
144
|
-
return (
|
|
145
|
-
<UITooltip title={severity.toUpperCase()}>
|
|
146
|
-
<UITag color={config.color} icon={config.icon}>
|
|
147
|
-
{severity.toUpperCase()}
|
|
148
|
-
</UITag>
|
|
149
|
-
</UITooltip>
|
|
150
|
-
);
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
title: 'Type',
|
|
155
|
-
dataIndex: 'type',
|
|
156
|
-
key: 'type',
|
|
157
|
-
width: 140,
|
|
158
|
-
render: (type: IncidentType) => (
|
|
159
|
-
<UITag>{getTypeLabel(type)}</UITag>
|
|
160
|
-
),
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
title: 'Title',
|
|
164
|
-
dataIndex: 'title',
|
|
165
|
-
key: 'title',
|
|
166
|
-
render: (title: string) => <strong>{title}</strong>,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
title: 'Time',
|
|
170
|
-
dataIndex: 'timestamp',
|
|
171
|
-
key: 'timestamp',
|
|
172
|
-
width: 180,
|
|
173
|
-
render: (timestamp: number) => (
|
|
174
|
-
<UITooltip title={formatTime(timestamp)}>
|
|
175
|
-
<span>{dayjs(timestamp).fromNow()}</span>
|
|
176
|
-
</UITooltip>
|
|
177
|
-
),
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
title: 'Status',
|
|
181
|
-
dataIndex: 'resolvedAt',
|
|
182
|
-
key: 'resolvedAt',
|
|
183
|
-
width: 120,
|
|
184
|
-
render: (resolvedAt: number | undefined, record: Incident) => {
|
|
185
|
-
if (resolvedAt) {
|
|
186
|
-
const duration = formatDuration(record.timestamp, resolvedAt);
|
|
187
|
-
return (
|
|
188
|
-
<UITooltip title={`Resolved in ${duration}`}>
|
|
189
|
-
<UITag color="success" icon={<UIIcon name="CheckCircleOutlined" />}>
|
|
190
|
-
RESOLVED
|
|
191
|
-
</UITag>
|
|
192
|
-
</UITooltip>
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
return (
|
|
196
|
-
<UITooltip title="Incident is still active">
|
|
197
|
-
<UITag color="error" icon={<UIIcon name="ClockCircleOutlined" />}>
|
|
198
|
-
ACTIVE
|
|
199
|
-
</UITag>
|
|
200
|
-
</UITooltip>
|
|
201
|
-
);
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
title: 'AI Analysis',
|
|
206
|
-
dataIndex: 'aiAnalysis',
|
|
207
|
-
key: 'aiAnalysis',
|
|
208
|
-
width: 100,
|
|
209
|
-
align: 'center' as const,
|
|
210
|
-
render: (aiAnalysis: any) => {
|
|
211
|
-
if (aiAnalysis) {
|
|
212
|
-
return <UIBadge variant="success">Yes</UIBadge>;
|
|
213
|
-
}
|
|
214
|
-
return <UIBadge variant="default">No</UIBadge>;
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
title: 'Actions',
|
|
219
|
-
key: 'actions',
|
|
220
|
-
width: 100,
|
|
221
|
-
align: 'center' as const,
|
|
222
|
-
render: (_: any, record: Incident) => (
|
|
223
|
-
<UIButton
|
|
224
|
-
variant="link"
|
|
225
|
-
icon={<UIIcon name="EyeOutlined" />}
|
|
226
|
-
onClick={() => handleViewIncident(record.id)}
|
|
227
|
-
>
|
|
228
|
-
View
|
|
229
|
-
</UIButton>
|
|
230
|
-
),
|
|
231
|
-
},
|
|
232
|
-
];
|
|
233
|
-
|
|
234
|
-
return (
|
|
235
|
-
<UIPage width="full">
|
|
236
|
-
<UIPageHeader
|
|
237
|
-
title="Incidents"
|
|
238
|
-
description="System incident history with AI-powered analysis"
|
|
239
|
-
actions={[
|
|
240
|
-
<UIButton
|
|
241
|
-
key="refresh"
|
|
242
|
-
icon={<UIIcon name="ReloadOutlined" />}
|
|
243
|
-
onClick={() => refetch()}
|
|
244
|
-
loading={isLoading}
|
|
245
|
-
>
|
|
246
|
-
Refresh
|
|
247
|
-
</UIButton>,
|
|
248
|
-
]}
|
|
249
|
-
/>
|
|
250
|
-
|
|
251
|
-
{error && (
|
|
252
|
-
<UIAlert
|
|
253
|
-
message="Failed to load incidents"
|
|
254
|
-
description={(error as Error).message}
|
|
255
|
-
variant="error"
|
|
256
|
-
showIcon
|
|
257
|
-
style={{ marginBottom: 24 }}
|
|
258
|
-
/>
|
|
259
|
-
)}
|
|
260
|
-
|
|
261
|
-
{/* Summary Statistics */}
|
|
262
|
-
{summary && (
|
|
263
|
-
<UIRow gutter={[16, 16]} style={{ marginBottom: 24 }}>
|
|
264
|
-
<UICol xs={24} sm={6}>
|
|
265
|
-
<UICard>
|
|
266
|
-
<UIStatistic
|
|
267
|
-
title="Total Incidents"
|
|
268
|
-
value={summary.total}
|
|
269
|
-
valueStyle={{ color: '#1890ff' }}
|
|
270
|
-
/>
|
|
271
|
-
</UICard>
|
|
272
|
-
</UICol>
|
|
273
|
-
<UICol xs={24} sm={6}>
|
|
274
|
-
<UICard>
|
|
275
|
-
<UIStatistic
|
|
276
|
-
title="Unresolved"
|
|
277
|
-
value={summary.unresolved}
|
|
278
|
-
valueStyle={{ color: summary.unresolved > 0 ? '#ff4d4f' : '#52c41a' }}
|
|
279
|
-
suffix={summary.unresolved > 0 ? <UIIcon name="FireOutlined" /> : <UIIcon name="CheckCircleOutlined" />}
|
|
280
|
-
/>
|
|
281
|
-
</UICard>
|
|
282
|
-
</UICol>
|
|
283
|
-
<UICol xs={24} sm={4}>
|
|
284
|
-
<UICard>
|
|
285
|
-
<UIStatistic
|
|
286
|
-
title="Critical"
|
|
287
|
-
value={summary.bySeverity.critical}
|
|
288
|
-
valueStyle={{ color: '#ff4d4f' }}
|
|
289
|
-
/>
|
|
290
|
-
</UICard>
|
|
291
|
-
</UICol>
|
|
292
|
-
<UICol xs={24} sm={4}>
|
|
293
|
-
<UICard>
|
|
294
|
-
<UIStatistic
|
|
295
|
-
title="Warning"
|
|
296
|
-
value={summary.bySeverity.warning}
|
|
297
|
-
valueStyle={{ color: '#faad14' }}
|
|
298
|
-
/>
|
|
299
|
-
</UICard>
|
|
300
|
-
</UICol>
|
|
301
|
-
<UICol xs={24} sm={4}>
|
|
302
|
-
<UICard>
|
|
303
|
-
<UIStatistic
|
|
304
|
-
title="Info"
|
|
305
|
-
value={summary.bySeverity.info}
|
|
306
|
-
valueStyle={{ color: '#1890ff' }}
|
|
307
|
-
/>
|
|
308
|
-
</UICard>
|
|
309
|
-
</UICol>
|
|
310
|
-
</UIRow>
|
|
311
|
-
)}
|
|
312
|
-
|
|
313
|
-
{/* Filters */}
|
|
314
|
-
<UICard style={{ marginBottom: 24 }}>
|
|
315
|
-
<UISpace size="middle" wrap>
|
|
316
|
-
<span>Filters:</span>
|
|
317
|
-
<UISelect
|
|
318
|
-
style={{ width: 140 }}
|
|
319
|
-
placeholder="Severity"
|
|
320
|
-
allowClear
|
|
321
|
-
value={filters.severity}
|
|
322
|
-
onChange={handleSeverityChange}
|
|
323
|
-
options={[
|
|
324
|
-
{ label: 'Critical', value: 'critical' },
|
|
325
|
-
{ label: 'Warning', value: 'warning' },
|
|
326
|
-
{ label: 'Info', value: 'info' },
|
|
327
|
-
]}
|
|
328
|
-
/>
|
|
329
|
-
<UISelect
|
|
330
|
-
style={{ width: 160 }}
|
|
331
|
-
placeholder="Type"
|
|
332
|
-
allowClear
|
|
333
|
-
value={filters.type}
|
|
334
|
-
onChange={handleTypeChange}
|
|
335
|
-
options={[
|
|
336
|
-
{ label: 'Error Rate', value: 'error_rate' },
|
|
337
|
-
{ label: 'Latency Spike', value: 'latency_spike' },
|
|
338
|
-
{ label: 'Plugin Failure', value: 'plugin_failure' },
|
|
339
|
-
{ label: 'Adapter Failure', value: 'adapter_failure' },
|
|
340
|
-
{ label: 'System Health', value: 'system_health' },
|
|
341
|
-
{ label: 'Custom', value: 'custom' },
|
|
342
|
-
]}
|
|
343
|
-
/>
|
|
344
|
-
<UISelect
|
|
345
|
-
style={{ width: 180 }}
|
|
346
|
-
value={filters.includeResolved ? 'true' : 'false'}
|
|
347
|
-
onChange={handleIncludeResolvedChange}
|
|
348
|
-
options={[
|
|
349
|
-
{ label: 'Active Only', value: 'false' },
|
|
350
|
-
{ label: 'Include Resolved', value: 'true' },
|
|
351
|
-
]}
|
|
352
|
-
/>
|
|
353
|
-
</UISpace>
|
|
354
|
-
</UICard>
|
|
355
|
-
|
|
356
|
-
{/* Incidents Table */}
|
|
357
|
-
<UICard>
|
|
358
|
-
<UITable
|
|
359
|
-
dataSource={incidents}
|
|
360
|
-
columns={columns}
|
|
361
|
-
rowKey="id"
|
|
362
|
-
loading={isLoading}
|
|
363
|
-
pagination={{
|
|
364
|
-
pageSize: 20,
|
|
365
|
-
}}
|
|
366
|
-
/>
|
|
367
|
-
</UICard>
|
|
368
|
-
</UIPage>
|
|
369
|
-
);
|
|
370
|
-
}
|