meyi-insight-ui-dev 1.0.0 → 1.0.1

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.
Files changed (70) hide show
  1. package/dist/InsightPage.d.ts +2 -1
  2. package/dist/components/common/AssignUsersDialog.d.ts +8 -0
  3. package/dist/components/common/AssigneeSelect.d.ts +7 -0
  4. package/dist/components/data-table/bulk-actions.d.ts +18 -0
  5. package/dist/components/data-table/column-header.d.ts +7 -0
  6. package/dist/components/data-table/faceted-filter.d.ts +15 -0
  7. package/dist/components/data-table/index.d.ts +6 -0
  8. package/dist/components/data-table/pagination.d.ts +7 -0
  9. package/dist/components/data-table/toolbar.d.ts +18 -0
  10. package/dist/components/data-table/view-options.d.ts +6 -0
  11. package/dist/components/ui/command.d.ts +18 -0
  12. package/dist/components/ui/dropdown-menu.d.ts +22 -18
  13. package/dist/components/ui/popover.d.ts +7 -0
  14. package/dist/components/ui/select.d.ts +15 -0
  15. package/dist/components/ui/textarea.d.ts +5 -0
  16. package/dist/components/ui/tooltip.d.ts +7 -0
  17. package/dist/context.d.ts +14 -0
  18. package/dist/features/alerts/components/AlertForm.d.ts +15 -0
  19. package/dist/features/alerts/components/{PromoteDialog.d.ts → ConvertDialog.d.ts} +2 -2
  20. package/dist/features/alerts/components/InsightAlertCard.d.ts +5 -2
  21. package/dist/features/alerts/components/alerts-columns.d.ts +11 -0
  22. package/dist/features/alerts/components/alerts-table.d.ts +25 -0
  23. package/dist/features/connectors/cloudwatch-wizard/CloudWatchConnectorWizard.d.ts +8 -0
  24. package/dist/features/connectors/components/ConnectorAwsOnboardingDialog.d.ts +41 -0
  25. package/dist/features/connectors/components/ConnectorDatadogSetupDialog.d.ts +21 -0
  26. package/dist/features/connectors/components/ConnectorDetailsDialog.d.ts +8 -0
  27. package/dist/features/connectors/components/ConnectorFilters.d.ts +18 -0
  28. package/dist/features/connectors/components/ConnectorGrafanaSetupDialog.d.ts +25 -0
  29. package/dist/features/connectors/components/ConnectorPrometheusSetupDialog.d.ts +10 -0
  30. package/dist/features/connectors/components/ConnectorTokenPolicyDialog.d.ts +11 -0
  31. package/dist/features/connectors/components/InsightConnectorCard.d.ts +7 -1
  32. package/dist/features/connectors/components/InsightConnectorForm.d.ts +2 -1
  33. package/dist/features/connectors/grafana-wizard/GrafanaConnectorWizard.d.ts +7 -0
  34. package/dist/features/connectors/prometheus-wizard/PrometheusConnectorWizard.d.ts +5 -0
  35. package/dist/features/connectors/source-selection/ConnectorSourcePickerDialog.d.ts +6 -0
  36. package/dist/features/incidents/components/IncidentComments.d.ts +9 -0
  37. package/dist/features/incidents/components/IncidentDeleteDialog.d.ts +8 -0
  38. package/dist/features/incidents/components/IncidentFilters.d.ts +18 -0
  39. package/dist/features/incidents/components/IncidentForm.d.ts +15 -0
  40. package/dist/features/incidents/components/IncidentTimeline.d.ts +4 -0
  41. package/dist/features/incidents/components/InsightIncidentCard.d.ts +2 -1
  42. package/dist/features/incidents/components/InsightRcaResult.d.ts +2 -1
  43. package/dist/features/incidents/components/incidents-columns.d.ts +7 -0
  44. package/dist/features/incidents/components/incidents-table.d.ts +18 -0
  45. package/dist/features/projects/components/projects-columns.d.ts +8 -0
  46. package/dist/features/projects/components/projects-table.d.ts +15 -0
  47. package/dist/features/sop/components/SopAiDialog.d.ts +8 -0
  48. package/dist/features/sop/components/SopCard.d.ts +9 -0
  49. package/dist/features/sop/components/SopDeleteDialog.d.ts +6 -0
  50. package/dist/features/sop/components/SopForm.d.ts +20 -0
  51. package/dist/features/sop/components/sop-columns.d.ts +6 -0
  52. package/dist/features/sop/components/sop-table.d.ts +20 -0
  53. package/dist/features/sop/detail.d.ts +5 -0
  54. package/dist/features/sop/index.d.ts +4 -0
  55. package/dist/hooks/use-table-url-state.d.ts +54 -0
  56. package/dist/hooks/useInsightPolling.d.ts +1 -0
  57. package/dist/hooks/useInsightUsers.d.ts +10 -0
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +176 -29
  60. package/dist/index.mjs +63176 -10489
  61. package/dist/lib/clipboard.d.ts +1 -0
  62. package/dist/router.d.ts +1 -1
  63. package/dist/services/insight.d.ts +136 -3
  64. package/dist/services/sop.d.ts +38 -0
  65. package/dist/style.css +1 -1
  66. package/dist/types.d.ts +370 -10
  67. package/package.json +7 -1
  68. package/dist/features/alerts/components/InsightAlertTable.d.ts +0 -10
  69. package/dist/features/incidents/components/InsightIncidentTable.d.ts +0 -8
  70. package/dist/features/projects/components/InsightProjectTable.d.ts +0 -8
package/dist/types.d.ts CHANGED
@@ -3,17 +3,332 @@ export type InsightConnector = {
3
3
  id: string;
4
4
  name: string;
5
5
  type: InsightConnectorType;
6
+ alertCount?: number;
6
7
  description?: string;
7
8
  isActive: boolean;
8
9
  webhookToken: string;
9
10
  webhookUrl: string;
11
+ awsLambdaName?: string;
12
+ awsAlarmNamePrefix?: string;
13
+ awsRegion?: string | null;
14
+ awsSelectedAlarmNames?: string[];
15
+ awsSelectedMetricKeys?: string[];
16
+ awsDeploymentStatus?: 'not_started' | 'pending' | 'deployed' | 'failed' | 'deleted' | string;
17
+ awsDeploymentStatusReason?: string | null;
18
+ awsStackName?: string | null;
19
+ awsStackId?: string | null;
20
+ grafanaBaseUrl?: string | null;
21
+ grafanaContactPointName?: string | null;
22
+ hasGrafanaAccountToken?: boolean;
23
+ grafanaSetupStatus?: 'not_started' | 'manual_ready' | 'configured' | 'failed' | string;
24
+ grafanaSetupStatusReason?: string | null;
25
+ prometheusEnvironment?: string | null;
26
+ prometheusReceiverName?: string | null;
27
+ prometheusSetupStatus?: 'not_started' | 'generated' | 'downloaded' | 'configured' | 'failed' | string;
28
+ prometheusSetupStatusReason?: string | null;
29
+ deliveryStatus?: 'unknown' | 'healthy' | 'failed' | string;
30
+ lastWebhookReceivedAt?: string | null;
31
+ lastSuccessfulWebhookAt?: string | null;
32
+ lastFailedWebhookAt?: string | null;
33
+ lastErrorCode?: string | null;
34
+ lastErrorMessage?: string | null;
35
+ lastAlertId?: string | null;
36
+ webhookSuccessCount?: number;
37
+ webhookFailureCount?: number;
38
+ tokenPolicy?: {
39
+ mode: 'expires' | 'unlimited';
40
+ expiresAt: string | null;
41
+ defaultTtlDays: number;
42
+ };
10
43
  createdAt: string;
11
44
  updatedAt: string;
12
45
  };
46
+ export type InsightWebhookFailureLog = {
47
+ id: string;
48
+ connectorId: string | null;
49
+ tokenPreview?: string | null;
50
+ errorCode: string;
51
+ errorMessage: string;
52
+ requestIp?: string | null;
53
+ userAgent?: string | null;
54
+ method?: string | null;
55
+ path?: string | null;
56
+ payload?: any;
57
+ createdAt: string;
58
+ };
59
+ export type InsightConnectorTokenPolicy = {
60
+ mode: 'expires' | 'unlimited';
61
+ expiresAt: string | null;
62
+ defaultTtlDays: number;
63
+ };
64
+ export type InsightCloudWatchDiscoverResult = {
65
+ ok: boolean;
66
+ connector: {
67
+ id: string;
68
+ name: string;
69
+ type: InsightConnectorType;
70
+ };
71
+ aws: {
72
+ region: string;
73
+ accessKeyIdMasked: string | null;
74
+ };
75
+ metrics: {
76
+ namespace: string;
77
+ metricName: string;
78
+ }[];
79
+ alarms: {
80
+ alarmName: string;
81
+ stateValue: string | null;
82
+ metricName: string | null;
83
+ namespace: string | null;
84
+ dimensions: {
85
+ name: string;
86
+ value: string;
87
+ }[];
88
+ }[];
89
+ };
90
+ export type InsightCloudWatchSetupResult = {
91
+ ok: boolean;
92
+ connector: {
93
+ id: string;
94
+ name: string;
95
+ type: InsightConnectorType;
96
+ };
97
+ setup: {
98
+ accessKeyId: string;
99
+ secretAccessKey: string;
100
+ sessionToken: string;
101
+ region: string;
102
+ stackName: string;
103
+ lambdaName: string;
104
+ alarmNamePrefix: string;
105
+ selectedAlarmNames: string[];
106
+ selectedMetricKeys: string[];
107
+ };
108
+ };
109
+ export type InsightCloudWatchDeployResult = {
110
+ ok: boolean;
111
+ connector: {
112
+ id: string;
113
+ name: string;
114
+ type: InsightConnectorType;
115
+ };
116
+ webhook: {
117
+ path: string;
118
+ url: string;
119
+ };
120
+ deployment: {
121
+ region: string;
122
+ stackName: string;
123
+ action: "create" | "update";
124
+ stackStatus: string | null;
125
+ stackId: string | null;
126
+ selectedAlarmNames: string[];
127
+ selectedMetricKeys: string[];
128
+ lambdaName: string;
129
+ alarmNamePrefix: string;
130
+ createdAlarmNames: string[];
131
+ alarmDefaults: {
132
+ threshold: number;
133
+ period: number;
134
+ evaluationPeriods: number;
135
+ statistic: string;
136
+ comparisonOperator: string;
137
+ treatMissingData: string;
138
+ };
139
+ };
140
+ templateDownloadUrl: string;
141
+ aws: {
142
+ region: string;
143
+ stackName: string;
144
+ accessKeyIdMasked: string | null;
145
+ };
146
+ };
147
+ export type InsightCloudWatchConsoleDeployResult = {
148
+ ok: boolean;
149
+ connector: {
150
+ id: string;
151
+ name: string;
152
+ type: InsightConnectorType;
153
+ };
154
+ webhook: {
155
+ path: string;
156
+ url: string;
157
+ };
158
+ deployment: {
159
+ method: string;
160
+ region: string;
161
+ stackName: string;
162
+ lambdaName: string;
163
+ deploymentStatusUrl: string;
164
+ templateUrl: string;
165
+ templateDownloadUrl: string;
166
+ quickCreateUrl: string;
167
+ isPublicTemplateUrl: boolean;
168
+ canPrefillTemplateUrl?: boolean;
169
+ resources: string[];
170
+ };
171
+ };
172
+ export type InsightCloudWatchLambdaOnboarding = {
173
+ ok: boolean;
174
+ connector: {
175
+ id: string;
176
+ name: string;
177
+ type: InsightConnectorType;
178
+ };
179
+ webhook: {
180
+ path: string;
181
+ url: string;
182
+ tokenPolicy?: InsightConnectorTokenPolicy;
183
+ isPublicHint: boolean;
184
+ };
185
+ automation: {
186
+ method: string;
187
+ region: string;
188
+ stackName: string;
189
+ templateUrl: string | null;
190
+ templateDownloadUrl: string;
191
+ quickCreateUrl: string | null;
192
+ deployWithTemplateUrlCommand: string | null;
193
+ note: string | null;
194
+ };
195
+ };
196
+ export type InsightGrafanaOnboarding = {
197
+ ok: boolean;
198
+ connector: {
199
+ id: string;
200
+ name: string;
201
+ type: InsightConnectorType;
202
+ };
203
+ webhook: {
204
+ path: string;
205
+ url: string;
206
+ tokenPolicy?: InsightConnectorTokenPolicy;
207
+ isPublicHint: boolean;
208
+ };
209
+ defaults: {
210
+ grafanaBaseUrl?: string;
211
+ contactPointName: string;
212
+ hasAccountToken?: boolean;
213
+ accountTokenMasked?: string;
214
+ matcherLabel: string;
215
+ matcherValue: string;
216
+ };
217
+ setup?: {
218
+ status: string;
219
+ statusReason: string | null;
220
+ contactPointName: string;
221
+ grafanaBaseUrl: string;
222
+ autoRoute: boolean;
223
+ policyUpdated: boolean;
224
+ matcher: {
225
+ label: string;
226
+ value: string;
227
+ } | null;
228
+ };
229
+ manual: {
230
+ steps: string[];
231
+ };
232
+ };
233
+ export type InsightGrafanaSetupResult = {
234
+ ok: boolean;
235
+ contactPointName: string;
236
+ webhookUrl: string;
237
+ autoRoute: boolean;
238
+ policyUpdated: boolean;
239
+ matcher: {
240
+ label: string;
241
+ value: string;
242
+ } | null;
243
+ grafanaBaseUrl: string;
244
+ contactPoint: any;
245
+ };
246
+ export type InsightGrafanaSaveResult = {
247
+ ok: boolean;
248
+ contactPointName: string;
249
+ grafanaBaseUrl: string;
250
+ autoRoute: boolean;
251
+ policyUpdated: boolean;
252
+ matcher: {
253
+ label: string;
254
+ value: string;
255
+ } | null;
256
+ };
257
+ export type InsightPrometheusOnboarding = {
258
+ ok: boolean;
259
+ connector: {
260
+ id: string;
261
+ name: string;
262
+ type: InsightConnectorType;
263
+ };
264
+ webhook: {
265
+ path: string;
266
+ url: string;
267
+ tokenPolicy?: InsightConnectorTokenPolicy;
268
+ isPublicHint: boolean;
269
+ };
270
+ defaults: {
271
+ receiverName: string;
272
+ dockerCommand?: string;
273
+ linuxCommand?: string;
274
+ kubernetesCommand?: string;
275
+ };
276
+ downloads?: {
277
+ dockerScript: string;
278
+ linuxScript: string;
279
+ kubernetesYaml: string;
280
+ };
281
+ environments?: Array<{
282
+ id: "docker" | "linux" | "kubernetes";
283
+ label: string;
284
+ description: string;
285
+ }>;
286
+ snippets: {
287
+ alertmanagerConfig: string;
288
+ reloadCommand: string;
289
+ note: string;
290
+ };
291
+ manual: {
292
+ steps: string[];
293
+ };
294
+ };
295
+ export type InsightDatadogOnboarding = {
296
+ ok: boolean;
297
+ connector: {
298
+ id: string;
299
+ name: string;
300
+ type: InsightConnectorType;
301
+ };
302
+ webhook: {
303
+ path: string;
304
+ url: string;
305
+ tokenPolicy?: InsightConnectorTokenPolicy;
306
+ isPublicHint: boolean;
307
+ };
308
+ defaults: {
309
+ site: string;
310
+ webhookName: string;
311
+ notifyHandle: string;
312
+ };
313
+ manual: {
314
+ steps: string[];
315
+ };
316
+ };
317
+ export type InsightDatadogSetupResult = {
318
+ ok: boolean;
319
+ action: "create" | "update";
320
+ site: string;
321
+ apiBase: string;
322
+ webhookName: string;
323
+ webhookUrl: string;
324
+ notifyHandle: string;
325
+ note: string;
326
+ };
13
327
  export type InsightAlertSeverity = 'critical' | 'high' | 'medium' | 'low';
14
- export type InsightAlertStatus = 'open' | 'promoted' | 'dismissed';
328
+ export type InsightAlertStatus = 'open' | 'converted' | 'dismissed';
15
329
  export type InsightAlert = {
16
330
  id: string;
331
+ aliasId?: string;
17
332
  connectorId?: string;
18
333
  connectorName?: string;
19
334
  connectorType?: string;
@@ -22,14 +337,24 @@ export type InsightAlert = {
22
337
  resourceType: string;
23
338
  projectTag?: string;
24
339
  severity: InsightAlertSeverity;
25
- title: string;
340
+ alertName: string;
26
341
  description?: string;
27
342
  status: InsightAlertStatus;
28
- promotedIncidentId?: string;
29
- alertTime: string;
343
+ incidentId?: string;
344
+ incidentAssigneeId?: string | null;
345
+ downTime: string;
30
346
  createdAt: string;
31
347
  updatedAt: string;
32
348
  };
349
+ export type InsightAlertSummary = {
350
+ total: number;
351
+ bySeverity: {
352
+ critical: number;
353
+ high: number;
354
+ medium: number;
355
+ low: number;
356
+ };
357
+ };
33
358
  export type InsightProject = {
34
359
  id: string;
35
360
  name: string;
@@ -49,16 +374,23 @@ export type InsightSettings = {
49
374
  awsBedrockRegion?: string;
50
375
  updatedAt: string;
51
376
  };
377
+ export type InsightIncidentComment = {
378
+ id: string;
379
+ message: string;
380
+ authorId?: string | null;
381
+ authorName?: string | null;
382
+ createdAt: string;
383
+ };
52
384
  export type InsightIncident = {
53
385
  id: string;
54
386
  aliasId?: number;
55
- monitorId: string;
56
- monitorName: string;
57
- monitorType: string;
58
- monitorUrl?: string;
387
+ name: string;
388
+ source: string;
389
+ resourceName: string;
390
+ resourceType: string;
59
391
  downMessage?: string;
60
392
  projectTag?: string;
61
- incidentDownTime: string | null;
393
+ downTime: string | null;
62
394
  resolvedAt?: string;
63
395
  analysisStatus: "pending" | "triggered" | "processing" | "completed" | "failed";
64
396
  progressPercent: number;
@@ -68,7 +400,9 @@ export type InsightIncident = {
68
400
  remediationSteps?: NewRemediationSteps | any[] | string | null;
69
401
  confidenceScore?: number | null;
70
402
  aiModelUsed?: string | null;
71
- sourceAlertId?: string | null;
403
+ alertId?: string | null;
404
+ assigneeIds?: string[];
405
+ comments?: InsightIncidentComment[];
72
406
  createdAt: string;
73
407
  updatedAt: string;
74
408
  };
@@ -162,6 +496,11 @@ export type NewInsightAnalysisResult = {
162
496
  root_cause_analysis?: string;
163
497
  contributing_factors?: string[];
164
498
  infra_change_analysis?: string;
499
+ evidence?: string[];
500
+ confidence?: number;
501
+ dependency_impact?: string[];
502
+ probable_root_cause?: string;
503
+ recommended_actions?: string[];
165
504
  };
166
505
  export type NewRemediationSteps = {
167
506
  immediate_actions?: string[];
@@ -171,3 +510,24 @@ export type NewRemediationSteps = {
171
510
  };
172
511
  /** @deprecated Use InsightConnector */
173
512
  export type CloudConnector = InsightConnector;
513
+ export type InsightSopSeverity = 'critical' | 'high' | 'medium' | 'low';
514
+ export type InsightSopStatus = 'draft' | 'pending' | 'approved' | 'generating';
515
+ export type InsightSop = {
516
+ id: string;
517
+ sopId: string;
518
+ title: string;
519
+ alertType?: string;
520
+ service?: string;
521
+ severity?: InsightSopSeverity;
522
+ status: InsightSopStatus;
523
+ description?: string;
524
+ prompt?: string;
525
+ alertId?: string;
526
+ alertName?: string;
527
+ source?: string;
528
+ project?: string;
529
+ steps?: string;
530
+ createdBy?: string;
531
+ createdAt: string;
532
+ updatedAt: string;
533
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meyi-insight-ui-dev",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -31,6 +31,7 @@
31
31
  "@radix-ui/react-dialog": "^1.1.15",
32
32
  "@radix-ui/react-dropdown-menu": "^2.1.16",
33
33
  "@radix-ui/react-label": "^2.1.8",
34
+ "@radix-ui/react-popover": "^1.1.15",
34
35
  "@radix-ui/react-scroll-area": "^1.2.10",
35
36
  "@radix-ui/react-select": "^2.2.0",
36
37
  "@radix-ui/react-separator": "^1.1.0",
@@ -39,10 +40,15 @@
39
40
  "@radix-ui/react-tooltip": "^1.2.0",
40
41
  "@tanstack/react-query": "^5.0.0",
41
42
  "@tanstack/react-router": "^1.132.0",
43
+ "@tanstack/react-table": "^8.21.3",
44
+ "@uiw/react-md-editor": "^4.1.1",
42
45
  "axios": "^1.12.0",
43
46
  "class-variance-authority": "^0.7.0",
44
47
  "clsx": "^2.1.0",
48
+ "cmdk": "^1.1.1",
45
49
  "lucide-react": "^0.545.0",
50
+ "next-remove-imports": "^1.0.13",
51
+ "socket.io-client": "^4.8.1",
46
52
  "sonner": "^2.0.0",
47
53
  "tailwind-merge": "^3.3.0",
48
54
  "tailwindcss": "^4.1.0",
@@ -1,10 +0,0 @@
1
- import { InsightAlert } from '../../../types.js';
2
- interface InsightAlertTableProps {
3
- alerts: InsightAlert[];
4
- deletingId: string | null;
5
- onViewIncident: (id: string) => void;
6
- onPromote: (alert: InsightAlert) => void;
7
- onDelete: (id: string) => void;
8
- }
9
- export declare function InsightAlertTable({ alerts, deletingId, onViewIncident, onPromote, onDelete, }: InsightAlertTableProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,8 +0,0 @@
1
- import { InsightIncident } from '../../../types.js';
2
- interface Props {
3
- incidents: InsightIncident[];
4
- loading?: boolean;
5
- onViewResult: (id: string) => void;
6
- }
7
- export declare function InsightIncidentTable({ incidents, loading, onViewResult }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { InsightProject } from '../../../types.js';
2
- interface InsightProjectTableProps {
3
- projects: InsightProject[];
4
- onEdit: (project: InsightProject) => void;
5
- onDelete: (project: InsightProject) => void;
6
- }
7
- export declare function InsightProjectTable({ projects, onEdit, onDelete, }: InsightProjectTableProps): import("react/jsx-runtime").JSX.Element;
8
- export {};