-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[SIEM] Added graph visualization to entity's flyout #260174
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
Changes from all commits
a90ce28
16d3f58
f7083dc
624978c
c5523cf
886869c
6b66550
22fdc65
e81fe49
6d5c6e0
dac3933
d3f9186
a044cc5
26d6593
6da30e8
a5c82e4
89d390b
d30d5af
eb52875
0b4d22c
4b6c975
697e422
afaeae4
cc84295
2a08cc5
ce5f889
416a217
0136d2e
c5cc04a
a32c76e
be6447e
ca091d2
fea3faa
2cc83a9
4a4da38
74b6963
3f0b459
2d219bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,6 +104,11 @@ export const isEntityRelationshipExpandedForScope = ( | |
| return store?.isEntityRelationshipExpanded(entityId) ?? false; | ||
| }; | ||
|
|
||
| export const isInitialEntityForScope = (scopeId: string, entityId: string): boolean => { | ||
| const store = stores.get(scopeId); | ||
| return store?.isInitialEntity(entityId) ?? false; | ||
| }; | ||
|
|
||
| /** | ||
| * Check if a filter is active for the given scope, field, and value. | ||
| * Returns false gracefully if no store exists (no warning logged). | ||
|
|
@@ -142,6 +147,7 @@ const stores = new Map<string, FilterStore>(); | |
| export class FilterStore { | ||
| readonly scopeId: string; | ||
| private dataViewId?: string; | ||
| private initialEntityIds: Array<{ id: string; isOrigin: boolean }> = []; | ||
| private readonly filters$ = new BehaviorSubject<Filter[]>([]); | ||
| private readonly expandedEntityIds$ = new BehaviorSubject<Set<string>>(new Set()); | ||
| private readonly filterEventSubscription: Subscription; | ||
|
|
@@ -174,6 +180,10 @@ export class FilterStore { | |
| } | ||
| } | ||
|
|
||
| setInitialEntityIds(initialEntityIds: Array<{ id: string; isOrigin: boolean }>): void { | ||
| this.initialEntityIds = initialEntityIds; | ||
| } | ||
|
|
||
| /** | ||
| * Get the current filters from the store. | ||
| */ | ||
|
|
@@ -244,7 +254,14 @@ export class FilterStore { | |
| * Check if an entity's relationships are currently expanded. | ||
| */ | ||
| isEntityRelationshipExpanded(entityId: string): boolean { | ||
| return this.expandedEntityIds$.value.has(entityId); | ||
| return this.expandedEntityIds$.value.has(entityId) || this.isInitialEntity(entityId); | ||
| } | ||
|
|
||
| /** | ||
| * Check if an entity ID is part of the initial set of entities (e.g. from the original graph request). | ||
| */ | ||
| isInitialEntity(entityId: string): boolean { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium
🚀 Reply "fix it for me" or copy this AI Prompt for your agent: |
||
| return this.initialEntityIds.find((entity) => entity.id === entityId)?.isOrigin ?? false; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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.
nit: I would extract the inline type and define it as an interface so we can reuse it twice in this file and in
use_graph_filters.ts