Skip to content

Commit d069a37

Browse files
[Backport 2.17] Fix issues in running historical analysis and custom result index section (#897)
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
1 parent f22b65c commit d069a37

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

public/pages/DefineDetector/components/CustomResultIndex/CustomResultIndex.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function CustomResultIndex(props: CustomResultIndexProps) {
9999
disabled={props.isEdit}
100100
onChange={() => {
101101
if (enabled) {
102-
form.setFieldValue('resultIndex', '');
102+
form.setFieldValue('resultIndex', undefined);
103103
}
104104
setEnabled(!enabled);
105105
}}

public/redux/reducers/ad.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,8 @@ export const startHistoricalDetector = (
493493
startTime: number,
494494
endTime: number
495495
): APIAction => {
496-
const baseUrl = `..${AD_NODE_API.DETECTOR}/${detectorId}`;
497-
const url = dataSourceId
498-
? `${baseUrl}/${dataSourceId}/start`
499-
: `${baseUrl}/start`;
496+
const baseUrl = `..${AD_NODE_API.DETECTOR}/${detectorId}/start`;
497+
const url = dataSourceId ? `${baseUrl}/${dataSourceId}` : baseUrl;
500498

501499
return {
502500
type: START_HISTORICAL_DETECTOR,

0 commit comments

Comments
 (0)