-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[EA] Add Chat-First experience to Entity Analytics #264985
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
Merged
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
515ad1e
[EA] Add rich renderer for security entity attachments
opauloh fee3130
This commit has a draft version of entity analytics in chat + some fi…
YulNaumenko bc082df
[EA] Expand entity attachment with rich sub-sections and follow-up ac…
opauloh a79cd4e
reverting agent build changes
opauloh 4d34457
fixed card and navigate to Entity page with chat
YulNaumenko 63204d4
fixed dashboard and links to chat
YulNaumenko 58ff2c3
[EA] Add data source filtering and inline table attachments for entit…
opauloh f8849e0
[EA] Improve entity resolution and attachment logic in get_entity tool
opauloh 400f787
[EA] Fix rendering and parsing issues for entity attachments in Agent…
opauloh a28e0bd
[EA] Enrich entity attachments with detailed risk and resolution stat…
opauloh 944ca6f
[EA] Improve entity table legibility in chat with horizontal scrolling
opauloh a9d7ba1
[EA] Use canonical entity IDs for more reliable entity attachment res…
opauloh 347aed6
[EA] Use record timestamp for more reliable "Last seen" in entity table
opauloh 6e5cd78
Merge branch 'entity-analytics-in-chat' into ea/chat-first-exp-combined
opauloh 937a289
revert temporary changes
opauloh 96a83ee
Merge branch 'main' into ea/chat-first-exp-combined
opauloh 1d4df71
[EA] Refine entity analytics prompt to prevent redundant markdown output
opauloh b130775
[EA] Refine dashboard trigger logic in entity analytics skill
opauloh 0f5eb17
Changes from node scripts/lint.js --fix
kibanamachine 59ae2fc
[EA] Implement rich entity renderer and canvas preview for security e…
opauloh 2f53661
[EA] Implement responsive layout for entity analytics dashboard risk …
opauloh b8eac09
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine d59e79f
[EA] Enhance entity attachment rendering and search precision in AI a…
opauloh c2f222b
Merge remote-tracking branch 'origin/ea/chat-first-exp-combined' into…
opauloh 0ca2e20
[EA] Clear search session before navigating from Agent Builder to Sec…
opauloh d5be8d6
Implement lazy loading pattern on Canvas-content
opauloh 46f3022
fix lint errors
opauloh 4f80cfe
remove unnecessary border
opauloh d5d4961
adding lazy loading on entity attachments
opauloh 7fd3bf4
Changes from node scripts/lint_ts_projects --fix
kibanamachine 6d72eb1
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine ef02834
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine d707e59
Enhance entity attachment functionality and improve error handling
opauloh 830a6de
Refine time range label handling in entity analytics skill documentation
opauloh cf7c8be
add pagination overrides
opauloh 4a3b68b
Merge remote-tracking branch 'origin/ea/chat-first-exp-combined' into…
opauloh fff9188
fix type errors
opauloh 89b1ee4
Refactor entity attachment components and tests for improved clarity …
opauloh 82b2d74
reverting change
opauloh 808f273
Merge branch 'main' into ea/chat-first-exp-combined
opauloh c47b7db
fixing unit test
opauloh c5302f3
Enhance entity analytics tool with sorting capabilities and parameter…
opauloh 7117cbf
Add unit tests for EntityCardActions component
opauloh 5e816db
addressing PR feedbacks
opauloh 8d32538
Enhance entity analytics tool with improved risk score handling and s…
opauloh d04c9b9
updating Entity Store default feature flag behavior
opauloh 535fab8
Refactor EntityListTable to improve label display
opauloh 2db55cf
addressing pr review feedback about incorporating user.name and host.…
opauloh ea3d7c4
adding clarification about the resolution target candidates
opauloh 987d2b1
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine 8f97128
Merge branch 'main' into ea/chat-first-exp-combined
opauloh c3ba9b8
revert on entity flyout changes
opauloh f772eeb
Add canvas width configuration for Entity Analytics and Entity Attach…
opauloh df35c46
Refactor experimental features and attachment registration
opauloh 84cfec9
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine 3d9daa7
entity risk level chart improvements
opauloh 8a14f90
update links to the explore page to open the entity analytics flyout …
opauloh 89a37a5
closing dashboard attachment when opening the entity flyout
opauloh 5412402
adding one more option to entity.source
opauloh 9458cbc
adding link to job id in entity analytics
opauloh 13b8f2a
Merge remote-tracking branch 'origin/ea/chat-first-exp-combined' into…
opauloh 046217c
Merge branch 'ea-page-ux-improvements-chart-only' into ea/chat-first-…
opauloh 56fa7de
removing datetime picker from the entity analytics table
opauloh cf00549
Changes from node scripts/lint.js --fix
kibanamachine 48f383a
updating show more badge and alerts fetching
opauloh bff01f2
Merge remote-tracking branch 'origin/ea/chat-first-exp-combined' into…
opauloh 07b9453
Merge remote-tracking branch 'upstream/main' into ea/chat-first-exp-c…
opauloh 22216b9
Changes from node scripts/styled_components_mapping
kibanamachine 0b7b6fa
fix ci type error
opauloh 66b2912
Merge remote-tracking branch 'origin/ea/chat-first-exp-combined' into…
opauloh 8bbc181
revert styled components usage
opauloh 28d70fa
Merge remote-tracking branch 'origin/main' into ea/chat-first-exp-com…
jaredburgettelastic a6406ea
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine aff44b1
Merge branch 'main' into ea/chat-first-exp-combined
enriquesanchez-elastic 7939735
Fix useIntervalForHeatmap tests passing numeric timestamps instead of…
hop-dev 525b709
[Entity Analytics] Default pageIndex for flyout-driven home URLs
hop-dev 2eba3a9
[Entity Analytics] Preserve URL state when opening flyout from Agent …
hop-dev acc31db
Fix accidentally reverted prebuiltRulesDeprecationUIEnabled flag
hop-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...solutions/security/plugins/security_solution/common/agent_builder_navigation_gate.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { agentBuilderDefaultAgentId } from '@kbn/agent-builder-common'; | ||
|
|
||
| import { | ||
| consumePreserveAgentBuilderSessionGate, | ||
| markPreserveAgentBuilderSessionDuringNextSecurityNavigation, | ||
| readLastAgentBuilderAgentIdForSecuritySession, | ||
| } from './agent_builder_navigation_gate'; | ||
|
|
||
| describe('agent_builder_navigation_gate', () => { | ||
| beforeEach(() => { | ||
| sessionStorage.clear(); | ||
| localStorage.clear(); | ||
| }); | ||
|
|
||
| it('consume returns false when not marked', () => { | ||
| expect(consumePreserveAgentBuilderSessionGate()).toBe(false); | ||
| expect(consumePreserveAgentBuilderSessionGate()).toBe(false); | ||
| }); | ||
|
|
||
| it('consume returns true once after mark', () => { | ||
| markPreserveAgentBuilderSessionDuringNextSecurityNavigation(); | ||
| expect(consumePreserveAgentBuilderSessionGate()).toBe(true); | ||
| expect(consumePreserveAgentBuilderSessionGate()).toBe(false); | ||
| }); | ||
|
|
||
| it('readLastAgentBuilderAgentIdForSecuritySession falls back to default', () => { | ||
| expect(readLastAgentBuilderAgentIdForSecuritySession()).toBe(agentBuilderDefaultAgentId); | ||
| }); | ||
|
|
||
| it('readLastAgentBuilderAgentIdForSecuritySession reads raw string from localStorage', () => { | ||
| localStorage.setItem('agentBuilder.agentId', 'my-agent'); | ||
| expect(readLastAgentBuilderAgentIdForSecuritySession()).toBe('my-agent'); | ||
| }); | ||
|
|
||
| it('readLastAgentBuilderAgentIdForSecuritySession parses JSON-encoded string', () => { | ||
| localStorage.setItem('agentBuilder.agentId', JSON.stringify('json-agent')); | ||
| expect(readLastAgentBuilderAgentIdForSecuritySession()).toBe('json-agent'); | ||
| }); | ||
| }); |
57 changes: 57 additions & 0 deletions
57
x-pack/solutions/security/plugins/security_solution/common/agent_builder_navigation_gate.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { agentBuilderDefaultAgentId } from '@kbn/agent-builder-common'; | ||
|
|
||
| /** Same as agent_builder `storageKeys.agentId`. */ | ||
| const AGENT_BUILDER_LAST_AGENT_ID_STORAGE_KEY = 'agentBuilder.agentId'; | ||
|
|
||
| /** | ||
| * Session flag: the next Security app effect teardown is from an in-app navigation that must not | ||
| * clear Agent Builder session state (e.g. "Open entity in Security" from an attachment). | ||
| */ | ||
| const IN_APP_NAV_PRESERVE_AGENT_BUILDER_SESSION_KEY = | ||
| 'securitySolution.preserveAgentBuilderSessionDuringInAppNav'; | ||
|
|
||
| export const readLastAgentBuilderAgentIdForSecuritySession = (): string => { | ||
| if (typeof window === 'undefined' || window.localStorage == null) { | ||
| return agentBuilderDefaultAgentId; | ||
| } | ||
| const stored = window.localStorage.getItem(AGENT_BUILDER_LAST_AGENT_ID_STORAGE_KEY); | ||
| if (stored == null || stored === '') { | ||
| return agentBuilderDefaultAgentId; | ||
| } | ||
| try { | ||
| const parsed = JSON.parse(stored); | ||
| return typeof parsed === 'string' ? parsed : stored; | ||
| } catch { | ||
| return stored; | ||
| } | ||
| }; | ||
|
|
||
| export const markPreserveAgentBuilderSessionDuringNextSecurityNavigation = (): void => { | ||
| try { | ||
| window.sessionStorage?.setItem(IN_APP_NAV_PRESERVE_AGENT_BUILDER_SESSION_KEY, '1'); | ||
| } catch { | ||
| // private mode / quota | ||
| } | ||
| }; | ||
|
|
||
| /** | ||
| * Returns true once if a preserve gate was set (and clears it). Idempotent per consume call. | ||
| */ | ||
| export const consumePreserveAgentBuilderSessionGate = (): boolean => { | ||
| try { | ||
| if (window.sessionStorage?.getItem(IN_APP_NAV_PRESERVE_AGENT_BUILDER_SESSION_KEY) === '1') { | ||
| window.sessionStorage.removeItem(IN_APP_NAV_PRESERVE_AGENT_BUILDER_SESSION_KEY); | ||
| return true; | ||
| } | ||
| } catch { | ||
| // ignore | ||
| } | ||
| return false; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.