-
Notifications
You must be signed in to change notification settings - Fork 18
Add match and count APIs #324
Add match and count APIs #324
Conversation
@@ -735,6 +737,45 @@ const getAnomalyResults = async ( | |||
} | |||
}; | |||
|
|||
const matchDetector = async ( |
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.
just curious: what does this API do? search detector by name?
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.
basically returns true
or false
if the passed params match any existing detector name, without returning any extra detector information that a user may not have access to if using FGAC
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.
See backend PR for more opendistro-for-elasticsearch/anomaly-detection#286
can you quickly check if e2e test passes? |
Getting a flaky test failing on my local, but these changes shouldn't affect it, I imagine it should still pass fine in the github runner |
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.
Thanks Tyler for the change!
Issue #, if available:
Description of changes:
This PR adds frontend support for the implemented
match
andcount
APIs (see here).These apis are used in 2 different parts for validation on the create/edit detector page, replacing the search API which caused a security leak by returning extra detector information for a user which they may not be supposed to have access to.
Notes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.