Skip to content

Commit 6912272

Browse files
committed
removed not populated fields
1 parent 3e5688a commit 6912272

8 files changed

Lines changed: 104 additions & 188 deletions

File tree

x-pack/plugins/alerting/server/task_runner/create_execution_handler.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ const createExecutionHandlerParams: jest.Mocked<
9595
contextVal: 'My other {{context.value}} goes here',
9696
stateVal: 'My other {{state.value}} goes here',
9797
},
98-
alertUpdatedBy: 'testUser',
9998
};
10099

101100
beforeEach(() => {
@@ -184,17 +183,12 @@ test('enqueues execution per selected action', async () => {
184183
},
185184
"message": "alert: test:1: 'name-of-alert' instanceId: '2' scheduled actionGroup: 'default' action: test:1",
186185
"rule": Object {
187-
"author": Array [
188-
"testUser",
189-
],
190-
"category": "Test",
191-
"id": "test",
186+
"category": "test",
187+
"id": "1",
192188
"license": "basic",
193189
"name": "name-of-alert",
194190
"namespace": "test1",
195191
"ruleset": "alerts",
196-
"uuid": "1",
197-
"version": undefined,
198192
},
199193
},
200194
],

x-pack/plugins/alerting/server/task_runner/create_execution_handler.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export interface CreateExecutionHandlerOptions<
5252
eventLogger: IEventLogger;
5353
request: KibanaRequest;
5454
alertParams: AlertTypeParams;
55-
alertUpdatedBy?: string;
5655
}
5756

5857
interface ExecutionHandlerOptions<ActionGroupIds extends string> {
@@ -88,7 +87,6 @@ export function createExecutionHandler<
8887
eventLogger,
8988
request,
9089
alertParams,
91-
alertUpdatedBy,
9290
}: CreateExecutionHandlerOptions<
9391
Params,
9492
State,
@@ -199,15 +197,12 @@ export function createExecutionHandler<
199197
],
200198
},
201199
rule: {
202-
id: alertType.id,
200+
id: alertId,
203201
license: alertType.minimumLicenseRequired,
204-
category: alertType.name,
202+
category: alertType.id,
205203
ruleset: alertType.producer,
206-
uuid: alertId,
207204
...namespace,
208205
name: alertName,
209-
author: alertUpdatedBy ? [alertUpdatedBy] : undefined,
210-
version: undefined,
211206
},
212207
};
213208

0 commit comments

Comments
 (0)