diff --git a/public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx b/public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx index dadff697..24ab61cb 100644 --- a/public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx +++ b/public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx @@ -109,7 +109,7 @@ function CustomResultIndex(props: CustomResultIndexProps) { disabled={props.isEdit} onChange={() => { if (enabled) { - form.setFieldValue('resultIndex', ''); + form.setFieldValue('resultIndex', undefined); } setEnabled(!enabled); }} diff --git a/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap b/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap index 6f3ee007..f84cbaef 100644 --- a/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap +++ b/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap @@ -1603,7 +1603,7 @@ exports[` empty creating detector definition renders the compo xmlns="http://www.w3.org/2000/svg" > @@ -2699,7 +2699,7 @@ exports[` empty editing detector definition renders the compon xmlns="http://www.w3.org/2000/svg" > @@ -3288,4 +3288,4 @@ exports[` empty editing detector definition renders the compon -`; +`; \ No newline at end of file diff --git a/public/redux/reducers/ad.ts b/public/redux/reducers/ad.ts index a1a689d1..9d456912 100644 --- a/public/redux/reducers/ad.ts +++ b/public/redux/reducers/ad.ts @@ -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`; + const url = dataSourceId ? `${baseUrl}/${dataSourceId}` : baseUrl; return { type: START_HISTORICAL_DETECTOR,