@spfn/monitor 0.1.0-beta.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.
- package/LICENSE +21 -0
- package/README.md +232 -0
- package/dist/config/index.d.ts +136 -0
- package/dist/config/index.js +72 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index-C9IUDNIv.d.ts +620 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/nextjs/client.d.ts +45 -0
- package/dist/nextjs/client.js +445 -0
- package/dist/nextjs/client.js.map +1 -0
- package/dist/server.d.ts +518 -0
- package/dist/server.js +3344 -0
- package/dist/server.js.map +1 -0
- package/migrations/0000_slow_mandrill.sql +57 -0
- package/migrations/meta/0000_snapshot.json +448 -0
- package/migrations/meta/_journal.json +13 -0
- package/package.json +103 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as _spfn_core_nextjs from '@spfn/core/nextjs';
|
|
2
|
+
import * as _spfn_core_route from '@spfn/core/route';
|
|
3
|
+
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
|
+
import { M as MonitorStats, m as monitorRouter } from './index-C9IUDNIv.js';
|
|
5
|
+
export { a as ERROR_GROUP_STATUSES, E as ErrorGroupStatus, b as LOG_LEVELS, L as LogLevel } from './index-C9IUDNIv.js';
|
|
6
|
+
import 'drizzle-orm/pg-core';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Type-safe API client for monitor routes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { monitorApi } from '@spfn/monitor';
|
|
14
|
+
*
|
|
15
|
+
* // Get dashboard stats
|
|
16
|
+
* const stats = await monitorApi.getStats.call({});
|
|
17
|
+
*
|
|
18
|
+
* // List errors
|
|
19
|
+
* const errors = await monitorApi.listErrors.call({
|
|
20
|
+
* query: { status: 'active', limit: 20 }
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
25
|
+
listErrors: _spfn_core_route.RouteDef<{
|
|
26
|
+
query: _sinclair_typebox.TObject<{
|
|
27
|
+
status: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
28
|
+
path: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
29
|
+
search: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
30
|
+
dateFrom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
31
|
+
dateTo: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
32
|
+
limit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
33
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
34
|
+
}>;
|
|
35
|
+
}, {}, {
|
|
36
|
+
status: "active" | "resolved" | "ignored";
|
|
37
|
+
path: string;
|
|
38
|
+
id: number;
|
|
39
|
+
fingerprint: string;
|
|
40
|
+
name: string;
|
|
41
|
+
message: string;
|
|
42
|
+
method: string;
|
|
43
|
+
statusCode: number;
|
|
44
|
+
count: number;
|
|
45
|
+
firstSeenAt: Date;
|
|
46
|
+
lastSeenAt: Date;
|
|
47
|
+
resolvedAt: Date | null;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}[]>;
|
|
51
|
+
getErrorDetail: _spfn_core_route.RouteDef<{
|
|
52
|
+
params: _sinclair_typebox.TObject<{
|
|
53
|
+
id: _sinclair_typebox.TNumber;
|
|
54
|
+
}>;
|
|
55
|
+
}, {}, {
|
|
56
|
+
group: {
|
|
57
|
+
status: "active" | "resolved" | "ignored";
|
|
58
|
+
path: string;
|
|
59
|
+
id: number;
|
|
60
|
+
fingerprint: string;
|
|
61
|
+
name: string;
|
|
62
|
+
message: string;
|
|
63
|
+
method: string;
|
|
64
|
+
statusCode: number;
|
|
65
|
+
count: number;
|
|
66
|
+
firstSeenAt: Date;
|
|
67
|
+
lastSeenAt: Date;
|
|
68
|
+
resolvedAt: Date | null;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
updatedAt: Date;
|
|
71
|
+
};
|
|
72
|
+
events: {
|
|
73
|
+
query: Record<string, string> | null;
|
|
74
|
+
id: number;
|
|
75
|
+
statusCode: number;
|
|
76
|
+
createdAt: Date;
|
|
77
|
+
updatedAt: Date;
|
|
78
|
+
headers: Record<string, string> | null;
|
|
79
|
+
groupId: number;
|
|
80
|
+
requestId: string | null;
|
|
81
|
+
userId: string | null;
|
|
82
|
+
stackTrace: string | null;
|
|
83
|
+
metadata: Record<string, unknown> | null;
|
|
84
|
+
}[];
|
|
85
|
+
}>;
|
|
86
|
+
updateErrorStatus: _spfn_core_route.RouteDef<{
|
|
87
|
+
params: _sinclair_typebox.TObject<{
|
|
88
|
+
id: _sinclair_typebox.TNumber;
|
|
89
|
+
}>;
|
|
90
|
+
body: _sinclair_typebox.TObject<{
|
|
91
|
+
status: _sinclair_typebox.TString;
|
|
92
|
+
}>;
|
|
93
|
+
}, {}, {
|
|
94
|
+
status: "active" | "resolved" | "ignored";
|
|
95
|
+
path: string;
|
|
96
|
+
id: number;
|
|
97
|
+
fingerprint: string;
|
|
98
|
+
name: string;
|
|
99
|
+
message: string;
|
|
100
|
+
method: string;
|
|
101
|
+
statusCode: number;
|
|
102
|
+
count: number;
|
|
103
|
+
firstSeenAt: Date;
|
|
104
|
+
lastSeenAt: Date;
|
|
105
|
+
resolvedAt: Date | null;
|
|
106
|
+
createdAt: Date;
|
|
107
|
+
updatedAt: Date;
|
|
108
|
+
}>;
|
|
109
|
+
listErrorEvents: _spfn_core_route.RouteDef<{
|
|
110
|
+
params: _sinclair_typebox.TObject<{
|
|
111
|
+
id: _sinclair_typebox.TNumber;
|
|
112
|
+
}>;
|
|
113
|
+
query: _sinclair_typebox.TObject<{
|
|
114
|
+
limit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
115
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
116
|
+
}>;
|
|
117
|
+
}, {}, {
|
|
118
|
+
query: Record<string, string> | null;
|
|
119
|
+
id: number;
|
|
120
|
+
statusCode: number;
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
updatedAt: Date;
|
|
123
|
+
headers: Record<string, string> | null;
|
|
124
|
+
groupId: number;
|
|
125
|
+
requestId: string | null;
|
|
126
|
+
userId: string | null;
|
|
127
|
+
stackTrace: string | null;
|
|
128
|
+
metadata: Record<string, unknown> | null;
|
|
129
|
+
}[]>;
|
|
130
|
+
listLogs: _spfn_core_route.RouteDef<{
|
|
131
|
+
query: _sinclair_typebox.TObject<{
|
|
132
|
+
level: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
133
|
+
source: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
134
|
+
search: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
135
|
+
requestId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
136
|
+
userId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
137
|
+
dateFrom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
138
|
+
dateTo: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
139
|
+
limit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
140
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
141
|
+
}>;
|
|
142
|
+
}, {}, {
|
|
143
|
+
id: number;
|
|
144
|
+
message: string;
|
|
145
|
+
createdAt: Date;
|
|
146
|
+
updatedAt: Date;
|
|
147
|
+
requestId: string | null;
|
|
148
|
+
userId: string | null;
|
|
149
|
+
metadata: Record<string, unknown> | null;
|
|
150
|
+
level: "debug" | "info" | "warn" | "error" | "fatal";
|
|
151
|
+
source: string | null;
|
|
152
|
+
}[]>;
|
|
153
|
+
getStats: _spfn_core_route.RouteDef<{}, {}, MonitorStats>;
|
|
154
|
+
}>>;
|
|
155
|
+
type MonitorRouter = typeof monitorRouter;
|
|
156
|
+
|
|
157
|
+
export { type MonitorRouter, MonitorStats, monitorApi };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { createApi } from "@spfn/core/nextjs";
|
|
3
|
+
|
|
4
|
+
// src/server/entities/schema.ts
|
|
5
|
+
import { createSchema } from "@spfn/core/db";
|
|
6
|
+
var monitorSchema = createSchema("@spfn/monitor");
|
|
7
|
+
|
|
8
|
+
// src/server/entities/error-groups.ts
|
|
9
|
+
import { text, integer, index } from "drizzle-orm/pg-core";
|
|
10
|
+
import { id, timestamps, enumText, utcTimestamp } from "@spfn/core/db";
|
|
11
|
+
var ERROR_GROUP_STATUSES = ["active", "resolved", "ignored"];
|
|
12
|
+
var errorGroups = monitorSchema.table(
|
|
13
|
+
"error_groups",
|
|
14
|
+
{
|
|
15
|
+
// Primary Key
|
|
16
|
+
id: id(),
|
|
17
|
+
// Business Key — SHA-256 first 16 hex chars of (name:message:path)
|
|
18
|
+
fingerprint: text("fingerprint").notNull().unique(),
|
|
19
|
+
// Error identification
|
|
20
|
+
name: text("name").notNull(),
|
|
21
|
+
message: text("message").notNull(),
|
|
22
|
+
path: text("path").notNull(),
|
|
23
|
+
method: text("method").notNull(),
|
|
24
|
+
statusCode: integer("status_code").notNull(),
|
|
25
|
+
// Status
|
|
26
|
+
status: enumText("status", ERROR_GROUP_STATUSES).default("active").notNull(),
|
|
27
|
+
// Counters
|
|
28
|
+
count: integer("count").notNull().default(1),
|
|
29
|
+
// Timeline
|
|
30
|
+
firstSeenAt: utcTimestamp("first_seen_at").notNull(),
|
|
31
|
+
lastSeenAt: utcTimestamp("last_seen_at").notNull(),
|
|
32
|
+
resolvedAt: utcTimestamp("resolved_at"),
|
|
33
|
+
...timestamps()
|
|
34
|
+
},
|
|
35
|
+
(table) => [
|
|
36
|
+
index("monitor_eg_fingerprint_idx").on(table.fingerprint),
|
|
37
|
+
index("monitor_eg_status_idx").on(table.status),
|
|
38
|
+
index("monitor_eg_last_seen_at_idx").on(table.lastSeenAt),
|
|
39
|
+
index("monitor_eg_path_idx").on(table.path)
|
|
40
|
+
]
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// src/server/entities/error-events.ts
|
|
44
|
+
import { text as text2, integer as integer2, jsonb, index as index2 } from "drizzle-orm/pg-core";
|
|
45
|
+
import { id as id2, timestamps as timestamps2, foreignKey } from "@spfn/core/db";
|
|
46
|
+
var errorEvents = monitorSchema.table(
|
|
47
|
+
"error_events",
|
|
48
|
+
{
|
|
49
|
+
// Primary Key
|
|
50
|
+
id: id2(),
|
|
51
|
+
// Foreign Key
|
|
52
|
+
groupId: foreignKey("group", () => errorGroups.id).notNull(),
|
|
53
|
+
// Request context
|
|
54
|
+
requestId: text2("request_id"),
|
|
55
|
+
userId: text2("user_id"),
|
|
56
|
+
statusCode: integer2("status_code").notNull(),
|
|
57
|
+
// Request details
|
|
58
|
+
headers: jsonb("headers").$type(),
|
|
59
|
+
query: jsonb("query").$type(),
|
|
60
|
+
stackTrace: text2("stack_trace"),
|
|
61
|
+
metadata: jsonb("metadata").$type(),
|
|
62
|
+
...timestamps2()
|
|
63
|
+
},
|
|
64
|
+
(table) => [
|
|
65
|
+
index2("monitor_ee_group_id_idx").on(table.groupId),
|
|
66
|
+
index2("monitor_ee_created_at_idx").on(table.createdAt),
|
|
67
|
+
index2("monitor_ee_user_id_idx").on(table.userId)
|
|
68
|
+
]
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
// src/server/entities/logs.ts
|
|
72
|
+
import { text as text3, jsonb as jsonb2, index as index3 } from "drizzle-orm/pg-core";
|
|
73
|
+
import { id as id3, timestamps as timestamps3, enumText as enumText2 } from "@spfn/core/db";
|
|
74
|
+
var LOG_LEVELS = ["debug", "info", "warn", "error", "fatal"];
|
|
75
|
+
var logs = monitorSchema.table(
|
|
76
|
+
"logs",
|
|
77
|
+
{
|
|
78
|
+
// Primary Key
|
|
79
|
+
id: id3(),
|
|
80
|
+
// Log data
|
|
81
|
+
level: enumText2("level", LOG_LEVELS).notNull(),
|
|
82
|
+
message: text3("message").notNull(),
|
|
83
|
+
source: text3("source"),
|
|
84
|
+
// Request context
|
|
85
|
+
requestId: text3("request_id"),
|
|
86
|
+
userId: text3("user_id"),
|
|
87
|
+
// Extra data
|
|
88
|
+
metadata: jsonb2("metadata").$type(),
|
|
89
|
+
...timestamps3()
|
|
90
|
+
},
|
|
91
|
+
(table) => [
|
|
92
|
+
index3("monitor_log_level_idx").on(table.level),
|
|
93
|
+
index3("monitor_log_source_idx").on(table.source),
|
|
94
|
+
index3("monitor_log_created_at_idx").on(table.createdAt)
|
|
95
|
+
]
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
// src/index.ts
|
|
99
|
+
var monitorApi = createApi({});
|
|
100
|
+
export {
|
|
101
|
+
ERROR_GROUP_STATUSES,
|
|
102
|
+
LOG_LEVELS,
|
|
103
|
+
monitorApi
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/server/entities/schema.ts","../src/server/entities/error-groups.ts","../src/server/entities/error-events.ts","../src/server/entities/logs.ts"],"sourcesContent":["/**\n * @spfn/monitor\n *\n * Error tracking, log management, and monitoring dashboard for SPFN\n *\n * @example\n * ```typescript\n * // Server-side\n * import { monitorRouter, createMonitorErrorHandler } from '@spfn/monitor/server';\n *\n * // Client-side (API calls)\n * import { monitorApi } from '@spfn/monitor';\n * const stats = await monitorApi.getStats.call({});\n * ```\n */\n\n// ============================================================================\n// API Client\n// ============================================================================\nimport { createApi } from '@spfn/core/nextjs';\nimport { monitorRouter } from './server/routes';\n\n/**\n * Type-safe API client for monitor routes\n *\n * @example\n * ```typescript\n * import { monitorApi } from '@spfn/monitor';\n *\n * // Get dashboard stats\n * const stats = await monitorApi.getStats.call({});\n *\n * // List errors\n * const errors = await monitorApi.listErrors.call({\n * query: { status: 'active', limit: 20 }\n * });\n * ```\n */\nexport const monitorApi = createApi<typeof monitorRouter>({});\n\n// Router type for external use\nexport type MonitorRouter = typeof monitorRouter;\n\n// ============================================================================\n// Shared Types (client-safe)\n// ============================================================================\nexport type {\n ErrorGroupStatus,\n LogLevel,\n} from './server/entities';\n\nexport type { MonitorStats } from './server/services/stats.service';\n\nexport {\n ERROR_GROUP_STATUSES,\n LOG_LEVELS,\n} from './server/entities';\n","/**\n * @spfn/monitor - Database Schema Definition\n *\n * Defines the 'spfn_monitor' PostgreSQL schema for all monitor-related tables\n */\n\nimport { createSchema } from '@spfn/core/db';\n\n/**\n * Monitor schema for all monitoring tables\n * Tables: error_groups, error_events, logs\n */\nexport const monitorSchema = createSchema('@spfn/monitor');\n","/**\n * @spfn/monitor - Error Groups Entity\n *\n * Groups errors by fingerprint (name + message + path) to avoid\n * duplicate tracking. Tracks count, status, and first/last seen times.\n */\n\nimport { text, integer, index } from 'drizzle-orm/pg-core';\nimport { id, timestamps, enumText, utcTimestamp } from '@spfn/core/db';\nimport { monitorSchema } from './schema';\n\n/**\n * Error group status types\n */\nexport const ERROR_GROUP_STATUSES = ['active', 'resolved', 'ignored'] as const;\nexport type ErrorGroupStatus = typeof ERROR_GROUP_STATUSES[number];\n\n/**\n * Error groups table — groups errors by fingerprint\n */\nexport const errorGroups = monitorSchema.table('error_groups',\n {\n // Primary Key\n id: id(),\n\n // Business Key — SHA-256 first 16 hex chars of (name:message:path)\n fingerprint: text('fingerprint').notNull().unique(),\n\n // Error identification\n name: text('name').notNull(),\n message: text('message').notNull(),\n path: text('path').notNull(),\n method: text('method').notNull(),\n statusCode: integer('status_code').notNull(),\n\n // Status\n status: enumText('status', ERROR_GROUP_STATUSES).default('active').notNull(),\n\n // Counters\n count: integer('count').notNull().default(1),\n\n // Timeline\n firstSeenAt: utcTimestamp('first_seen_at').notNull(),\n lastSeenAt: utcTimestamp('last_seen_at').notNull(),\n resolvedAt: utcTimestamp('resolved_at'),\n\n ...timestamps(),\n },\n (table) => [\n index('monitor_eg_fingerprint_idx').on(table.fingerprint),\n index('monitor_eg_status_idx').on(table.status),\n index('monitor_eg_last_seen_at_idx').on(table.lastSeenAt),\n index('monitor_eg_path_idx').on(table.path),\n ]\n);\n\nexport type ErrorGroup = typeof errorGroups.$inferSelect;\nexport type NewErrorGroup = typeof errorGroups.$inferInsert;\n","/**\n * @spfn/monitor - Error Events Entity\n *\n * Individual error occurrences linked to an error group.\n * Stores request-specific context (headers, query, stack trace).\n */\n\nimport { text, integer, jsonb, index } from 'drizzle-orm/pg-core';\nimport { id, timestamps, foreignKey } from '@spfn/core/db';\nimport { monitorSchema } from './schema';\nimport { errorGroups } from './error-groups';\n\n/**\n * Error events table — individual error occurrences\n */\nexport const errorEvents = monitorSchema.table('error_events',\n {\n // Primary Key\n id: id(),\n\n // Foreign Key\n groupId: foreignKey('group', () => errorGroups.id).notNull(),\n\n // Request context\n requestId: text('request_id'),\n userId: text('user_id'),\n statusCode: integer('status_code').notNull(),\n\n // Request details\n headers: jsonb('headers').$type<Record<string, string>>(),\n query: jsonb('query').$type<Record<string, string>>(),\n stackTrace: text('stack_trace'),\n metadata: jsonb('metadata').$type<Record<string, unknown>>(),\n\n ...timestamps(),\n },\n (table) => [\n index('monitor_ee_group_id_idx').on(table.groupId),\n index('monitor_ee_created_at_idx').on(table.createdAt),\n index('monitor_ee_user_id_idx').on(table.userId),\n ]\n);\n\nexport type ErrorEvent = typeof errorEvents.$inferSelect;\nexport type NewErrorEvent = typeof errorEvents.$inferInsert;\n","/**\n * @spfn/monitor - Logs Entity\n *\n * Developer logs stored in DB for retrieval via admin dashboard.\n * Supports level-based filtering, source tracking, and metadata.\n */\n\nimport { text, jsonb, index } from 'drizzle-orm/pg-core';\nimport { id, timestamps, enumText } from '@spfn/core/db';\nimport { monitorSchema } from './schema';\n\n/**\n * Log level types\n */\nexport const LOG_LEVELS = ['debug', 'info', 'warn', 'error', 'fatal'] as const;\nexport type LogLevel = typeof LOG_LEVELS[number];\n\n/**\n * Logs table — developer log entries\n */\nexport const logs = monitorSchema.table('logs',\n {\n // Primary Key\n id: id(),\n\n // Log data\n level: enumText('level', LOG_LEVELS).notNull(),\n message: text('message').notNull(),\n source: text('source'),\n\n // Request context\n requestId: text('request_id'),\n userId: text('user_id'),\n\n // Extra data\n metadata: jsonb('metadata').$type<Record<string, unknown>>(),\n\n ...timestamps(),\n },\n (table) => [\n index('monitor_log_level_idx').on(table.level),\n index('monitor_log_source_idx').on(table.source),\n index('monitor_log_created_at_idx').on(table.createdAt),\n ]\n);\n\nexport type Log = typeof logs.$inferSelect;\nexport type NewLog = typeof logs.$inferInsert;\n"],"mappings":"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","names":["text","integer","index","id","timestamps","id","text","integer","timestamps","index","text","jsonb","index","id","timestamps","enumText","id","enumText","text","jsonb","timestamps","index"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @spfn/monitor - Monitor Dashboard Component
|
|
5
|
+
*
|
|
6
|
+
* Main entry point combining StatsOverview, ErrorListView, and LogViewer in tabs
|
|
7
|
+
*/
|
|
8
|
+
declare function MonitorDashboard(): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @spfn/monitor - Stats Overview Component
|
|
12
|
+
*
|
|
13
|
+
* Displays error/log counts and trend indicators
|
|
14
|
+
*/
|
|
15
|
+
declare function StatsOverview(): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @spfn/monitor - Error List View Component
|
|
19
|
+
*
|
|
20
|
+
* Displays error groups in a filterable table with status badges
|
|
21
|
+
*/
|
|
22
|
+
interface ErrorListViewProps {
|
|
23
|
+
onSelect?: (id: number) => void;
|
|
24
|
+
}
|
|
25
|
+
declare function ErrorListView({ onSelect }: ErrorListViewProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @spfn/monitor - Error Detail View Component
|
|
29
|
+
*
|
|
30
|
+
* Shows error group details with event timeline and status change buttons
|
|
31
|
+
*/
|
|
32
|
+
interface ErrorDetailViewProps {
|
|
33
|
+
errorId: number;
|
|
34
|
+
onBack?: () => void;
|
|
35
|
+
}
|
|
36
|
+
declare function ErrorDetailView({ errorId, onBack }: ErrorDetailViewProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @spfn/monitor - Log Viewer Component
|
|
40
|
+
*
|
|
41
|
+
* Searchable, filterable log list with expandable metadata
|
|
42
|
+
*/
|
|
43
|
+
declare function LogViewer(): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
export { ErrorDetailView, ErrorListView, LogViewer, MonitorDashboard, StatsOverview };
|