-
Notifications
You must be signed in to change notification settings - Fork 61
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
support storing detector result to customr result index #110
support storing detector result to customr result index #110
Conversation
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
This PR formats some code, suggest open "Hide whitespace" when review code. |
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
…e chart not showing results from custom result index
Couple high-level things:
|
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
5a97048
to
6ef26f7
Compare
public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx
Outdated
Show resolved
Hide resolved
@@ -347,7 +351,7 @@ export const AnomalyHistory = (props: AnomalyHistoryProps) => { | |||
props.isHistorical, | |||
taskId.current | |||
); | |||
return dispatch(searchResults(entityResultQuery)); | |||
return dispatch(searchResults(entityResultQuery, resultIndex)); |
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.
most of the queries / results parsing has been changed as part of multi-category filtering PR. Will need to keep an eye on that when merging.
public/pages/ReviewAndCreate/components/DetectorDefinitionFields/DetectorDefinitionFields.tsx
Outdated
Show resolved
Hide resolved
public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx
Outdated
Show resolved
Hide resolved
Another minor question, maybe it's a detail in the backend PR, need to look more. But what would happen if a user starts a fresh cluster and only creates custom result indices detectors first? Does the default result system index still get inited? And if not, does either frontend or backend handle any errors properly if that index is missing? |
public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx
Outdated
Show resolved
Hide resolved
public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx
Outdated
Show resolved
Hide resolved
May need to fix some broken tests and update snapshots with |
Default result index will not be inited if just create detector with custom result index on a fresh cluster.Tested locally, no issue found. |
public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx
Outdated
Show resolved
Hide resolved
@@ -63,6 +69,19 @@ export const validateName = ( | |||
} | |||
}; | |||
|
|||
export const validateCustomResultIndex = (name: string): string | undefined => { |
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.
In future this method can also be used when user tries inputing custom data source index.
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.
Currently we allow user to choose concrete index or input index pattern like "abc*". So can't reuse this part directly. We can revisit/refactor this part in future if needed.
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.
LGTM!
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.
LGTM, make sure you sign off all commits in the future. Will merge DCO check after this PR is merged so there will be no issue for this PR at the moment.
Shouldn't the backend have been merged before this one? I guess all will be merged soon enough, so no big issue |
…roject#110) * support storing detector result to customr result index Signed-off-by: Yaliang Wu <ylwu@amazon.com> * reformat with prettier Signed-off-by: Yaliang Wu <ylwu@amazon.com> * make prettier version consistent with dashboard; fix AD dashboard live chart not showing results from custom result index * tune result index filed description based on tech writer's comments Signed-off-by: Yaliang Wu <ylwu@amazon.com> * tune custom result index ux; add more comments * show custom result index when update detector; fix failed test * fix typo
* support storing detector result to customr result index Signed-off-by: Yaliang Wu <ylwu@amazon.com> * reformat with prettier Signed-off-by: Yaliang Wu <ylwu@amazon.com> * make prettier version consistent with dashboard; fix AD dashboard live chart not showing results from custom result index * tune result index filed description based on tech writer's comments Signed-off-by: Yaliang Wu <ylwu@amazon.com> * tune custom result index ux; add more comments * show custom result index when update detector; fix failed test * fix typo
Signed-off-by: Yaliang Wu ylwu@amazon.com
Description
Now we store anomaly result in system index. User can user search anomaly result API to query data in result system index, but user can't search that index to build their own dashboard. This PR add option to let user specify their own custom result index and AD plugin will store detector's result to that index. So user can get detector result by searching that index directly.
Main changes:
TODO: fix some test ; add more test for new code
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.