mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Remove id from item list (#146805)
## Remove id from item list when try to close alerts during update exceptions close: https://github.com/elastic/kibana/issues/146661 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
83657cd537
commit
7261175571
1 changed files with 6 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import type { EuiCommentProps } from '@elastic/eui';
|
||||
import { EuiText, EuiAvatar } from '@elastic/eui';
|
||||
import { capitalize } from 'lodash';
|
||||
import { capitalize, omit } from 'lodash';
|
||||
import moment from 'moment';
|
||||
|
||||
import type {
|
||||
|
@ -143,11 +143,12 @@ export const prepareExceptionItemsForBulkClose = (
|
|||
return exceptionItems.map((item: ExceptionListItemSchema) => {
|
||||
if (item.entries !== undefined) {
|
||||
const newEntries = item.entries.map((itemEntry: Entry | EntryNested) => {
|
||||
const entry = omit(itemEntry, 'id') as Entry | EntryNested;
|
||||
return {
|
||||
...itemEntry,
|
||||
field: itemEntry.field.startsWith('event.')
|
||||
? itemEntry.field.replace(/^event./, `${ALERT_ORIGINAL_EVENT}.`)
|
||||
: itemEntry.field,
|
||||
...entry,
|
||||
field: entry.field.startsWith('event.')
|
||||
? entry.field.replace(/^event./, `${ALERT_ORIGINAL_EVENT}.`)
|
||||
: entry.field,
|
||||
};
|
||||
});
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue