-
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
[SIEM] [Detections] Fix open close signal on detail page #56757
Changes from all commits
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 |
---|---|---|
|
@@ -33,7 +33,11 @@ export const setSignalsStatusRouteDef = (server: ServerFacade): Hapi.ServerRoute | |
queryObject = { ids: { values: signalIds } }; | ||
} | ||
if (query) { | ||
queryObject = query; | ||
queryObject = { | ||
bool: { | ||
filter: query, | ||
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. I am surprised you are locking down the backend to only work with a filter query? This does make the backend more limited with this change where every query is now a filter? If @dhurley14 is ok with the API change then this is good. Just pointing out I typically would try to keep the API as flexible as we can and push the logic more front end when it does the query. But...Like I said if @dhurley14 sees this as the correct path I am ok because sometimes things like this is a bit of an "art form" where you do want to lock things down more compared to keeping them "loose". 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. Yeah I thought the same thing. The query for open / close is copied across a couple different areas of the frontend so this was the "quicker" fix but long term we definitely should keep this more flexible. There might be a larger discussion around exposing crud operations on the signals index itself. Just a thought. But yes I agree I would like to keep the API flexible. Quick fix for now though. I'll open an issue to come back to this in the near future. |
||
}, | ||
}; | ||
} | ||
try { | ||
return callWithRequest(request, 'updateByQuery', { | ||
|
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: Doesn't isEmpty catch the
null
andundefined
, do you need the?? []
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.
yes but typescript is still yelling at me