Skip to content

Commit

Permalink
[RAM] Performance to our browser field endpoint (#157523)
Browse files Browse the repository at this point in the history
## Summary

Fix #155000

We had to re-introduce this endpoint to allow our user to access alert
fields without creating a specific privileges on the alert index.

---------

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
  • Loading branch information
XavierM and jcger authored May 16, 2023
1 parent 16941fd commit e68bb9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const columns: Array<
}),
id: TIMESTAMP,
initialWidth: 230,
schema: 'datetime',
},
{
columnHeaderType: 'not-filtered',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const fieldDescriptorToBrowserFieldMapper = (fields: FieldDescriptor[]):
const category = getFieldCategory(field);
const browserField = browserFieldFactory(field, category);

if (browserFields[category]) {
browserFields[category] = { fields: { ...browserFields[category].fields, ...browserField } };
if (browserFields[category] && browserFields[category]) {
Object.assign(browserFields[category].fields, browserField);
} else {
browserFields[category] = { fields: browserField };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ export function registerAlertsTableConfiguration({
id: '@timestamp',
displayAsText: 'Last updated',
initialWidth: 250,
schema: 'datetime',
},
{
id: 'kibana.alert.duration.us',
displayAsText: 'Duration',
initialWidth: 150,
schema: 'numeric',
},
{
id: 'kibana.alert.reason',
Expand Down

0 comments on commit e68bb9b

Please sign in to comment.