-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Data Frame Analytics exploration: adds actions column with link to discover #151482
[ML] Data Frame Analytics exploration: adds actions column with link to discover #151482
Conversation
Pinging @elastic/ml-ui (:ml) |
query: indexData.visibleColumns | ||
.filter((column) => !column.includes(resultsField!)) | ||
.map((column) => { | ||
if (item[column] !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if item[column]
is undefined
it looks like this string will be incorrect as undefined
will be added to it.
Maybe there should be a filter before the map to remove this risk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes! Good catch - I'll add it to the filter above 👍
Fixed in 7aea101
Yeah - I can do that. Right now it reflects the anomalies table Actions column - so depends on if we want to be consistent with the example or the anomalies table. cc @walterra, @peteharverson |
This is ready for another look when you get a chance 🙏 cc @jgowdyelastic, @walterra (@peteharverson for layout approval) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filters: data.query.filterManager.getFilters(), | ||
query: { | ||
language: SEARCH_QUERY_LANGUAGE.KUERY, | ||
// Filter for all visible column values of supported types - except the results field values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did wonder if we should add all columns to the filter, but that could potentially be a lot of columns. This way the user can control the filter by showing / hiding columns from the grid, so I think this makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of minor comments, but otherwise LGTM
} | ||
}, | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
[indexData?.visibleColumns, discoverLocator, dataViewId, resultsField, tableItems] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can data
be included here to remove the need to suppress this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included in 1664d29
]; | ||
|
||
return ( | ||
<> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this fragment isn't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in 1664d29
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Related issue: #150375
This PR adds an 'Actions' column to the results data grid and provides a link to Discover filtering for the row's field/values shown in the columns.
Checklist
Delete any items that are not applicable to this PR.