[Discover] Cell actions extension#190754
Conversation
|
/ci |
68000ef to
82ecafc
Compare
|
/ci |
e901ed7 to
ffebaab
Compare
|
/ci |
ffebaab to
b16eccd
Compare
|
/ci |
|
/ci |
davismcphee
left a comment
There was a problem hiding this comment.
I think I may still have to investigate the page load bundle increase (we'll see what CI says), but otherwise this should be good to review now.
| // Security Solution overrides our cell actions -- this is a temporary workaroud to keep | ||
| // things working as they do currently until we can migrate their actions to One Discover | ||
| const isInSecuritySolution = | ||
| useObservable(discoverServices.application.currentAppId$) === 'securitySolutionUI'; |
There was a problem hiding this comment.
@elastic/security-threat-hunting-investigations I wanted to build this extension point on top of kbn-cell-actions since Unified Data Table already supports it, rather than introducing an alternative approach. Unfortunately this conflicts with the saved search embeddable cell action overrides currently active within the Security Solution UI.
So I needed a way to disable the cell actions extension point when it would conflict with the overrides and couldn't figure out another way other than this. I'm open to ideas for a cleaner approach, but my thinking is that this won't be needed eventually anyway since ideally we'll migrate the current Security actions to a context aware Discover profile instead.
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
|
/ci |
jughosta
left a comment
There was a problem hiding this comment.
Looks great!
The additional cell actions don't appear on Surrounding Documents page. Is it expected?
| [documentState.esqlQueryColumns] | ||
| ); | ||
|
|
||
| const { filters } = useQuerySubscriber({ data: services.data }); |
There was a problem hiding this comment.
Can we rather take filters via useAppStateSelector hook above as we do for query?
There was a problem hiding this comment.
I'd prefer to do something like that, but unfortunately the app state filters don't include the pinned filters.
davismcphee
left a comment
There was a problem hiding this comment.
The additional cell actions don't appear on Surrounding Documents page. Is it expected?
Nope not expected, I just missed it, thanks! Updated to support surrounding docs here: 2d66307
| [documentState.esqlQueryColumns] | ||
| ); | ||
|
|
||
| const { filters } = useQuerySubscriber({ data: services.data }); |
There was a problem hiding this comment.
I'd prefer to do something like that, but unfortunately the app state filters don't include the pinned filters.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @davismcphee |
Summary
This PR adds a new cell actions extension to Discover using the

kbn-cell-actionsframework which Unified Data Table already supports, allowing profiles to register additional cell actions within the data grid:The extension point supports the following:
isCompatiblemethod, allowing cell actions to be shown for all cells in a column or conditionally based on the column field, etc.contextobject including the currentfield,value,dataSource,dataView,query,filters, andtimeRange.Note that currently cell actions do not have access to the entire record, only the current cell value. We can support this as a followup if needed, but it will require an enhancement to
kbn-cell-actions.Testing
discover.experimental.enabledProfiles: ['example-root-profile', 'example-data-source-profile', 'example-document-profile']tokibana.dev.ymland start Kibana.node scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load test/functional/fixtures/es_archiver/discover/context_awareness.my-example-logsdata view or target the index in an ES|QL query.Resolves #186576.
Checklist
For maintainers