Skip to content
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

Fix issues in running historical analysis and custom result index section #889

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function CustomResultIndex(props: CustomResultIndexProps) {
disabled={props.isEdit}
onChange={() => {
if (enabled) {
form.setFieldValue('resultIndex', '');
form.setFieldValue('resultIndex', undefined);
}
setEnabled(!enabled);
}}
Expand Down
6 changes: 2 additions & 4 deletions public/redux/reducers/ad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,8 @@ export const startHistoricalDetector = (
startTime: number,
endTime: number
): APIAction => {
const baseUrl = `${AD_NODE_API.DETECTOR}/${detectorId}`;
const url = dataSourceId
? `${baseUrl}/${dataSourceId}/start`
: `${baseUrl}/start`;
const baseUrl = `${AD_NODE_API.DETECTOR}/${detectorId}/start`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have _start instead of start? or both can be used?
ref: https://opensearch.org/docs/latest/observing-your-data/ad/api/#start-detector-job

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have to use start here. It's different from the _start in the doc you pasted

const url = dataSourceId ? `${baseUrl}/${dataSourceId}` : baseUrl;

return {
type: START_HISTORICAL_DETECTOR,
Expand Down
Loading