@oneuptime/common 10.0.31 → 10.0.33
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/Models/AnalyticsModels/ExceptionInstance.ts +29 -4
- package/Models/AnalyticsModels/Log.ts +110 -4
- package/Models/AnalyticsModels/Metric.ts +16 -9
- package/Models/AnalyticsModels/MonitorLog.ts +4 -2
- package/Models/AnalyticsModels/Span.ts +79 -6
- package/Models/DatabaseModels/Index.ts +8 -0
- package/Models/DatabaseModels/LogDropFilter.ts +480 -0
- package/Models/DatabaseModels/LogPipeline.ts +412 -0
- package/Models/DatabaseModels/LogPipelineProcessor.ts +430 -0
- package/Models/DatabaseModels/LogScrubRule.ts +516 -0
- package/Server/API/TelemetryAPI.ts +261 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1773402621107-MigrationName.ts +131 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1773414578773-MigrationName.ts +79 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1773500000000-MigrationName.ts +41 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1773676206197-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Services/AnalyticsDatabaseService.ts +61 -0
- package/Server/Services/LogAggregationService.ts +238 -1
- package/Server/Services/LogDropFilterService.ts +10 -0
- package/Server/Services/LogPipelineProcessorService.ts +10 -0
- package/Server/Services/LogPipelineService.ts +10 -0
- package/Server/Services/LogScrubRuleService.ts +10 -0
- package/Server/Services/TelemetryAttributeService.ts +4 -6
- package/Server/Utils/AnalyticsDatabase/Statement.ts +15 -1
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +126 -11
- package/Tests/Server/Services/LogAggregationService.test.ts +3 -2
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +9 -0
- package/Types/AnalyticsDatabase/TableColumnType.ts +4 -0
- package/Types/Date.ts +22 -0
- package/Types/Log/LogDropFilterAction.ts +6 -0
- package/Types/Log/LogPipelineProcessorType.ts +44 -0
- package/Types/Log/LogScrubAction.ts +7 -0
- package/Types/Log/LogScrubPatternType.ts +10 -0
- package/Types/Permission.ts +174 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +152 -4
- package/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.tsx +92 -0
- package/UI/Components/LogsViewer/components/LogDetailsPanel.tsx +332 -117
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +294 -274
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +513 -234
- package/UI/Components/LogsViewer/components/LogsFilterCard.tsx +37 -29
- package/UI/Components/LogsViewer/components/LogsTable.tsx +6 -1
- package/UI/Components/LogsViewer/components/LogsViewerToolbar.tsx +106 -0
- package/UI/Utils/LogExport.ts +160 -0
- package/build/dist/Models/AnalyticsModels/ExceptionInstance.js +28 -4
- package/build/dist/Models/AnalyticsModels/ExceptionInstance.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Log.js +97 -4
- package/build/dist/Models/AnalyticsModels/Log.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Metric.js +16 -9
- package/build/dist/Models/AnalyticsModels/Metric.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/MonitorLog.js +4 -2
- package/build/dist/Models/AnalyticsModels/MonitorLog.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Span.js +73 -6
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +8 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LogDropFilter.js +508 -0
- package/build/dist/Models/DatabaseModels/LogDropFilter.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogPipeline.js +438 -0
- package/build/dist/Models/DatabaseModels/LogPipeline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogPipelineProcessor.js +452 -0
- package/build/dist/Models/DatabaseModels/LogPipelineProcessor.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogScrubRule.js +545 -0
- package/build/dist/Models/DatabaseModels/LogScrubRule.js.map +1 -0
- package/build/dist/Server/API/TelemetryAPI.js +155 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773402621107-MigrationName.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773402621107-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773414578773-MigrationName.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773414578773-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773500000000-MigrationName.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773500000000-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773676206197-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1773676206197-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +30 -0
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +188 -1
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogDropFilterService.js +9 -0
- package/build/dist/Server/Services/LogDropFilterService.js.map +1 -0
- package/build/dist/Server/Services/LogPipelineProcessorService.js +9 -0
- package/build/dist/Server/Services/LogPipelineProcessorService.js.map +1 -0
- package/build/dist/Server/Services/LogPipelineService.js +9 -0
- package/build/dist/Server/Services/LogPipelineService.js.map +1 -0
- package/build/dist/Server/Services/LogScrubRuleService.js +9 -0
- package/build/dist/Server/Services/LogScrubRuleService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryAttributeService.js +4 -6
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +13 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +89 -2
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Tests/Server/Services/LogAggregationService.test.js +3 -2
- package/build/dist/Tests/Server/Services/LogAggregationService.test.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +10 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -0
- package/build/dist/Types/AnalyticsDatabase/TableColumnType.js +4 -0
- package/build/dist/Types/AnalyticsDatabase/TableColumnType.js.map +1 -1
- package/build/dist/Types/Date.js +16 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Log/LogDropFilterAction.js +7 -0
- package/build/dist/Types/Log/LogDropFilterAction.js.map +1 -0
- package/build/dist/Types/Log/LogPipelineProcessorType.js +9 -0
- package/build/dist/Types/Log/LogPipelineProcessorType.js.map +1 -0
- package/build/dist/Types/Log/LogScrubAction.js +8 -0
- package/build/dist/Types/Log/LogScrubAction.js.map +1 -0
- package/build/dist/Types/Log/LogScrubPatternType.js +11 -0
- package/build/dist/Types/Log/LogScrubPatternType.js.map +1 -0
- package/build/dist/Types/Permission.js +152 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +124 -11
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.js +36 -0
- package/build/dist/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.js.map +1 -0
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js +114 -4
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +17 -5
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +229 -122
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFilterCard.js +5 -4
- package/build/dist/UI/Components/LogsViewer/components/LogsFilterCard.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js +4 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js +28 -0
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js.map +1 -1
- package/build/dist/UI/Utils/LogExport.js +129 -0
- package/build/dist/UI/Utils/LogExport.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import Project from "./Project";
|
|
2
|
+
import User from "./User";
|
|
3
|
+
import LogPipeline from "./LogPipeline";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import Route from "../../Types/API/Route";
|
|
6
|
+
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
|
|
7
|
+
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
|
|
8
|
+
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
|
|
9
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
10
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
11
|
+
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
|
|
12
|
+
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
|
|
13
|
+
import TableColumn from "../../Types/Database/TableColumn";
|
|
14
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
15
|
+
import TableMetadata from "../../Types/Database/TableMetadata";
|
|
16
|
+
import TenantColumn from "../../Types/Database/TenantColumn";
|
|
17
|
+
import IconProp from "../../Types/Icon/IconProp";
|
|
18
|
+
import ObjectID from "../../Types/ObjectID";
|
|
19
|
+
import Permission from "../../Types/Permission";
|
|
20
|
+
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
|
|
21
|
+
import { JSONObject } from "../../Types/JSON";
|
|
22
|
+
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
23
|
+
|
|
24
|
+
@EnableDocumentation()
|
|
25
|
+
@TableBillingAccessControl({
|
|
26
|
+
create: PlanType.Free,
|
|
27
|
+
read: PlanType.Free,
|
|
28
|
+
update: PlanType.Free,
|
|
29
|
+
delete: PlanType.Free,
|
|
30
|
+
})
|
|
31
|
+
@TenantColumn("projectId")
|
|
32
|
+
@CrudApiEndpoint(new Route("/log-pipeline-processor"))
|
|
33
|
+
@Entity({
|
|
34
|
+
name: "LogPipelineProcessor",
|
|
35
|
+
})
|
|
36
|
+
@TableMetadata({
|
|
37
|
+
tableName: "LogPipelineProcessor",
|
|
38
|
+
singularName: "Log Pipeline Processor",
|
|
39
|
+
pluralName: "Log Pipeline Processors",
|
|
40
|
+
icon: IconProp.Settings,
|
|
41
|
+
tableDescription:
|
|
42
|
+
"Individual processors within a log pipeline that transform log data during ingestion.",
|
|
43
|
+
})
|
|
44
|
+
@TableAccessControl({
|
|
45
|
+
create: [
|
|
46
|
+
Permission.ProjectOwner,
|
|
47
|
+
Permission.ProjectAdmin,
|
|
48
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
49
|
+
],
|
|
50
|
+
read: [
|
|
51
|
+
Permission.ProjectOwner,
|
|
52
|
+
Permission.ProjectAdmin,
|
|
53
|
+
Permission.ProjectMember,
|
|
54
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
55
|
+
Permission.ReadAllProjectResources,
|
|
56
|
+
],
|
|
57
|
+
delete: [
|
|
58
|
+
Permission.ProjectOwner,
|
|
59
|
+
Permission.ProjectAdmin,
|
|
60
|
+
Permission.DeleteProjectLogPipelineProcessor,
|
|
61
|
+
],
|
|
62
|
+
update: [
|
|
63
|
+
Permission.ProjectOwner,
|
|
64
|
+
Permission.ProjectAdmin,
|
|
65
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
66
|
+
],
|
|
67
|
+
})
|
|
68
|
+
export default class LogPipelineProcessor extends BaseModel {
|
|
69
|
+
@ColumnAccessControl({
|
|
70
|
+
create: [
|
|
71
|
+
Permission.ProjectOwner,
|
|
72
|
+
Permission.ProjectAdmin,
|
|
73
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
74
|
+
],
|
|
75
|
+
read: [
|
|
76
|
+
Permission.ProjectOwner,
|
|
77
|
+
Permission.ProjectAdmin,
|
|
78
|
+
Permission.ProjectMember,
|
|
79
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
80
|
+
Permission.ReadAllProjectResources,
|
|
81
|
+
],
|
|
82
|
+
update: [],
|
|
83
|
+
})
|
|
84
|
+
@TableColumn({
|
|
85
|
+
manyToOneRelationColumn: "projectId",
|
|
86
|
+
type: TableColumnType.Entity,
|
|
87
|
+
modelType: Project,
|
|
88
|
+
title: "Project",
|
|
89
|
+
description:
|
|
90
|
+
"Relation to the project this log pipeline processor belongs to.",
|
|
91
|
+
})
|
|
92
|
+
@ManyToOne(
|
|
93
|
+
() => {
|
|
94
|
+
return Project;
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
eager: false,
|
|
98
|
+
nullable: true,
|
|
99
|
+
onDelete: "CASCADE",
|
|
100
|
+
orphanedRowAction: "nullify",
|
|
101
|
+
},
|
|
102
|
+
)
|
|
103
|
+
@JoinColumn({ name: "projectId" })
|
|
104
|
+
public project?: Project = undefined;
|
|
105
|
+
|
|
106
|
+
@ColumnAccessControl({
|
|
107
|
+
create: [
|
|
108
|
+
Permission.ProjectOwner,
|
|
109
|
+
Permission.ProjectAdmin,
|
|
110
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
111
|
+
],
|
|
112
|
+
read: [
|
|
113
|
+
Permission.ProjectOwner,
|
|
114
|
+
Permission.ProjectAdmin,
|
|
115
|
+
Permission.ProjectMember,
|
|
116
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
117
|
+
Permission.ReadAllProjectResources,
|
|
118
|
+
],
|
|
119
|
+
update: [],
|
|
120
|
+
})
|
|
121
|
+
@Index()
|
|
122
|
+
@TableColumn({
|
|
123
|
+
type: TableColumnType.ObjectID,
|
|
124
|
+
required: true,
|
|
125
|
+
canReadOnRelationQuery: true,
|
|
126
|
+
title: "Project ID",
|
|
127
|
+
description: "ID of the project this log pipeline processor belongs to.",
|
|
128
|
+
})
|
|
129
|
+
@Column({
|
|
130
|
+
type: ColumnType.ObjectID,
|
|
131
|
+
nullable: false,
|
|
132
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
133
|
+
})
|
|
134
|
+
public projectId?: ObjectID = undefined;
|
|
135
|
+
|
|
136
|
+
@ColumnAccessControl({
|
|
137
|
+
create: [
|
|
138
|
+
Permission.ProjectOwner,
|
|
139
|
+
Permission.ProjectAdmin,
|
|
140
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
141
|
+
],
|
|
142
|
+
read: [
|
|
143
|
+
Permission.ProjectOwner,
|
|
144
|
+
Permission.ProjectAdmin,
|
|
145
|
+
Permission.ProjectMember,
|
|
146
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
147
|
+
Permission.ReadAllProjectResources,
|
|
148
|
+
],
|
|
149
|
+
update: [],
|
|
150
|
+
})
|
|
151
|
+
@TableColumn({
|
|
152
|
+
manyToOneRelationColumn: "logPipelineId",
|
|
153
|
+
type: TableColumnType.Entity,
|
|
154
|
+
modelType: LogPipeline,
|
|
155
|
+
title: "Log Pipeline",
|
|
156
|
+
description: "Relation to the log pipeline this processor belongs to.",
|
|
157
|
+
})
|
|
158
|
+
@ManyToOne(
|
|
159
|
+
() => {
|
|
160
|
+
return LogPipeline;
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
eager: false,
|
|
164
|
+
nullable: false,
|
|
165
|
+
onDelete: "CASCADE",
|
|
166
|
+
orphanedRowAction: "delete",
|
|
167
|
+
},
|
|
168
|
+
)
|
|
169
|
+
@JoinColumn({ name: "logPipelineId" })
|
|
170
|
+
public logPipeline?: LogPipeline = undefined;
|
|
171
|
+
|
|
172
|
+
@ColumnAccessControl({
|
|
173
|
+
create: [
|
|
174
|
+
Permission.ProjectOwner,
|
|
175
|
+
Permission.ProjectAdmin,
|
|
176
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
177
|
+
],
|
|
178
|
+
read: [
|
|
179
|
+
Permission.ProjectOwner,
|
|
180
|
+
Permission.ProjectAdmin,
|
|
181
|
+
Permission.ProjectMember,
|
|
182
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
183
|
+
Permission.ReadAllProjectResources,
|
|
184
|
+
],
|
|
185
|
+
update: [],
|
|
186
|
+
})
|
|
187
|
+
@Index()
|
|
188
|
+
@TableColumn({
|
|
189
|
+
type: TableColumnType.ObjectID,
|
|
190
|
+
required: true,
|
|
191
|
+
canReadOnRelationQuery: true,
|
|
192
|
+
title: "Log Pipeline ID",
|
|
193
|
+
description: "ID of the log pipeline this processor belongs to.",
|
|
194
|
+
})
|
|
195
|
+
@Column({
|
|
196
|
+
type: ColumnType.ObjectID,
|
|
197
|
+
nullable: false,
|
|
198
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
199
|
+
})
|
|
200
|
+
public logPipelineId?: ObjectID = undefined;
|
|
201
|
+
|
|
202
|
+
@ColumnAccessControl({
|
|
203
|
+
create: [
|
|
204
|
+
Permission.ProjectOwner,
|
|
205
|
+
Permission.ProjectAdmin,
|
|
206
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
207
|
+
],
|
|
208
|
+
read: [
|
|
209
|
+
Permission.ProjectOwner,
|
|
210
|
+
Permission.ProjectAdmin,
|
|
211
|
+
Permission.ProjectMember,
|
|
212
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
213
|
+
Permission.ReadAllProjectResources,
|
|
214
|
+
],
|
|
215
|
+
update: [
|
|
216
|
+
Permission.ProjectOwner,
|
|
217
|
+
Permission.ProjectAdmin,
|
|
218
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
219
|
+
],
|
|
220
|
+
})
|
|
221
|
+
@TableColumn({
|
|
222
|
+
required: true,
|
|
223
|
+
type: TableColumnType.Name,
|
|
224
|
+
canReadOnRelationQuery: true,
|
|
225
|
+
title: "Name",
|
|
226
|
+
description: "Friendly name for this processor.",
|
|
227
|
+
})
|
|
228
|
+
@Column({
|
|
229
|
+
nullable: false,
|
|
230
|
+
type: ColumnType.Name,
|
|
231
|
+
length: ColumnLength.Name,
|
|
232
|
+
})
|
|
233
|
+
public name?: string = undefined;
|
|
234
|
+
|
|
235
|
+
@ColumnAccessControl({
|
|
236
|
+
create: [
|
|
237
|
+
Permission.ProjectOwner,
|
|
238
|
+
Permission.ProjectAdmin,
|
|
239
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
240
|
+
],
|
|
241
|
+
read: [
|
|
242
|
+
Permission.ProjectOwner,
|
|
243
|
+
Permission.ProjectAdmin,
|
|
244
|
+
Permission.ProjectMember,
|
|
245
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
246
|
+
Permission.ReadAllProjectResources,
|
|
247
|
+
],
|
|
248
|
+
update: [
|
|
249
|
+
Permission.ProjectOwner,
|
|
250
|
+
Permission.ProjectAdmin,
|
|
251
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
252
|
+
],
|
|
253
|
+
})
|
|
254
|
+
@TableColumn({
|
|
255
|
+
required: true,
|
|
256
|
+
type: TableColumnType.ShortText,
|
|
257
|
+
canReadOnRelationQuery: true,
|
|
258
|
+
title: "Processor Type",
|
|
259
|
+
description:
|
|
260
|
+
"The type of processor: GrokParser, AttributeRemapper, SeverityRemapper, or CategoryProcessor.",
|
|
261
|
+
})
|
|
262
|
+
@Column({
|
|
263
|
+
nullable: false,
|
|
264
|
+
type: ColumnType.ShortText,
|
|
265
|
+
length: ColumnLength.ShortText,
|
|
266
|
+
})
|
|
267
|
+
public processorType?: string = undefined;
|
|
268
|
+
|
|
269
|
+
@ColumnAccessControl({
|
|
270
|
+
create: [
|
|
271
|
+
Permission.ProjectOwner,
|
|
272
|
+
Permission.ProjectAdmin,
|
|
273
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
274
|
+
],
|
|
275
|
+
read: [
|
|
276
|
+
Permission.ProjectOwner,
|
|
277
|
+
Permission.ProjectAdmin,
|
|
278
|
+
Permission.ProjectMember,
|
|
279
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
280
|
+
Permission.ReadAllProjectResources,
|
|
281
|
+
],
|
|
282
|
+
update: [
|
|
283
|
+
Permission.ProjectOwner,
|
|
284
|
+
Permission.ProjectAdmin,
|
|
285
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
286
|
+
],
|
|
287
|
+
})
|
|
288
|
+
@TableColumn({
|
|
289
|
+
title: "Configuration",
|
|
290
|
+
required: true,
|
|
291
|
+
type: TableColumnType.JSON,
|
|
292
|
+
canReadOnRelationQuery: true,
|
|
293
|
+
description:
|
|
294
|
+
"Processor-specific configuration as JSON (e.g., grok pattern, source/target fields, mapping rules).",
|
|
295
|
+
})
|
|
296
|
+
@Column({
|
|
297
|
+
type: ColumnType.JSON,
|
|
298
|
+
nullable: false,
|
|
299
|
+
default: () => {
|
|
300
|
+
return "'{}'";
|
|
301
|
+
},
|
|
302
|
+
})
|
|
303
|
+
public configuration?: JSONObject = undefined;
|
|
304
|
+
|
|
305
|
+
@ColumnAccessControl({
|
|
306
|
+
create: [
|
|
307
|
+
Permission.ProjectOwner,
|
|
308
|
+
Permission.ProjectAdmin,
|
|
309
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
310
|
+
],
|
|
311
|
+
read: [
|
|
312
|
+
Permission.ProjectOwner,
|
|
313
|
+
Permission.ProjectAdmin,
|
|
314
|
+
Permission.ProjectMember,
|
|
315
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
316
|
+
Permission.ReadAllProjectResources,
|
|
317
|
+
],
|
|
318
|
+
update: [
|
|
319
|
+
Permission.ProjectOwner,
|
|
320
|
+
Permission.ProjectAdmin,
|
|
321
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
322
|
+
],
|
|
323
|
+
})
|
|
324
|
+
@Index()
|
|
325
|
+
@TableColumn({
|
|
326
|
+
required: true,
|
|
327
|
+
type: TableColumnType.Boolean,
|
|
328
|
+
canReadOnRelationQuery: true,
|
|
329
|
+
title: "Enabled",
|
|
330
|
+
description: "Whether this processor is active.",
|
|
331
|
+
defaultValue: true,
|
|
332
|
+
})
|
|
333
|
+
@Column({
|
|
334
|
+
nullable: false,
|
|
335
|
+
type: ColumnType.Boolean,
|
|
336
|
+
default: true,
|
|
337
|
+
})
|
|
338
|
+
public isEnabled?: boolean = undefined;
|
|
339
|
+
|
|
340
|
+
@ColumnAccessControl({
|
|
341
|
+
create: [
|
|
342
|
+
Permission.ProjectOwner,
|
|
343
|
+
Permission.ProjectAdmin,
|
|
344
|
+
Permission.CreateProjectLogPipelineProcessor,
|
|
345
|
+
],
|
|
346
|
+
read: [
|
|
347
|
+
Permission.ProjectOwner,
|
|
348
|
+
Permission.ProjectAdmin,
|
|
349
|
+
Permission.ProjectMember,
|
|
350
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
351
|
+
Permission.ReadAllProjectResources,
|
|
352
|
+
],
|
|
353
|
+
update: [
|
|
354
|
+
Permission.ProjectOwner,
|
|
355
|
+
Permission.ProjectAdmin,
|
|
356
|
+
Permission.EditProjectLogPipelineProcessor,
|
|
357
|
+
],
|
|
358
|
+
})
|
|
359
|
+
@TableColumn({
|
|
360
|
+
title: "Sort Order",
|
|
361
|
+
required: true,
|
|
362
|
+
type: TableColumnType.Number,
|
|
363
|
+
canReadOnRelationQuery: true,
|
|
364
|
+
description:
|
|
365
|
+
"Determines the execution order of this processor within its pipeline.",
|
|
366
|
+
defaultValue: 0,
|
|
367
|
+
})
|
|
368
|
+
@Column({
|
|
369
|
+
type: ColumnType.Number,
|
|
370
|
+
nullable: false,
|
|
371
|
+
default: 0,
|
|
372
|
+
})
|
|
373
|
+
public sortOrder?: number = undefined;
|
|
374
|
+
|
|
375
|
+
@ColumnAccessControl({
|
|
376
|
+
create: [],
|
|
377
|
+
read: [
|
|
378
|
+
Permission.ProjectOwner,
|
|
379
|
+
Permission.ProjectAdmin,
|
|
380
|
+
Permission.ProjectMember,
|
|
381
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
382
|
+
Permission.ReadAllProjectResources,
|
|
383
|
+
],
|
|
384
|
+
update: [],
|
|
385
|
+
})
|
|
386
|
+
@TableColumn({
|
|
387
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
388
|
+
type: TableColumnType.Entity,
|
|
389
|
+
modelType: User,
|
|
390
|
+
title: "Created By User",
|
|
391
|
+
description:
|
|
392
|
+
"Relation to the user who created this log pipeline processor.",
|
|
393
|
+
})
|
|
394
|
+
@ManyToOne(
|
|
395
|
+
() => {
|
|
396
|
+
return User;
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
eager: false,
|
|
400
|
+
nullable: true,
|
|
401
|
+
onDelete: "SET NULL",
|
|
402
|
+
orphanedRowAction: "nullify",
|
|
403
|
+
},
|
|
404
|
+
)
|
|
405
|
+
@JoinColumn({ name: "createdByUserId" })
|
|
406
|
+
public createdByUser?: User = undefined;
|
|
407
|
+
|
|
408
|
+
@ColumnAccessControl({
|
|
409
|
+
create: [],
|
|
410
|
+
read: [
|
|
411
|
+
Permission.ProjectOwner,
|
|
412
|
+
Permission.ProjectAdmin,
|
|
413
|
+
Permission.ProjectMember,
|
|
414
|
+
Permission.ReadProjectLogPipelineProcessor,
|
|
415
|
+
Permission.ReadAllProjectResources,
|
|
416
|
+
],
|
|
417
|
+
update: [],
|
|
418
|
+
})
|
|
419
|
+
@TableColumn({
|
|
420
|
+
type: TableColumnType.ObjectID,
|
|
421
|
+
title: "Created By User ID",
|
|
422
|
+
description: "ID of the user who created this log pipeline processor.",
|
|
423
|
+
})
|
|
424
|
+
@Column({
|
|
425
|
+
type: ColumnType.ObjectID,
|
|
426
|
+
nullable: true,
|
|
427
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
428
|
+
})
|
|
429
|
+
public createdByUserId?: ObjectID = undefined;
|
|
430
|
+
}
|