Skip to content

Commit dcbf79e

Browse files
committed
fix(ui): TE-XXXX show loader when evaluation is running for enum query
1 parent 8dd598b commit dcbf79e

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

thirdeye-ui/src/app/pages/create-alert/sections/aggregation-granularity-detection/detection/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ export const SelectDetection = (): JSX.Element => {
129129
if (updatedAlertInsight) {
130130
setAlertInsight(updatedAlertInsight);
131131
setSelectedTimeRange({
132-
startTime: updatedAlertInsight.datasetStartTime,
133-
endTime: updatedAlertInsight.datasetEndTime,
132+
startTime: updatedAlertInsight.defaultStartTime,
133+
endTime: updatedAlertInsight.defaultEndTime,
134134
});
135135
}
136136
}

thirdeye-ui/src/app/pages/create-alert/sections/aggregation-granularity-detection/detection/multiple-dimension/sql-query-view.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
*/
1515
// external
1616
import React, { useEffect } from "react";
17-
import { Box, Button, Grid, TextareaAutosize } from "@material-ui/core";
17+
import {
18+
Box,
19+
Button,
20+
CircularProgress,
21+
Grid,
22+
TextareaAutosize,
23+
} from "@material-ui/core";
1824
import { useTranslation } from "react-i18next";
1925

2026
// styles
@@ -39,6 +45,7 @@ import {
3945
NotificationTypeV1,
4046
useNotificationProviderV1,
4147
} from "../../../../../../platform/components";
48+
import { ActionStatus } from "../../../../../../rest/actions.interfaces";
4249

4350
const ALERT_TEMPLATE_FOR_EVALUATE_QUERY_DX = "startree-threshold-query-dx";
4451

@@ -164,7 +171,20 @@ export const SqlQueryView = (): JSX.Element => {
164171
justifyContent="space-between"
165172
>
166173
<Button
174+
disabled={
175+
apiState.evaluationState?.status ===
176+
ActionStatus.Working
177+
}
167178
size="small"
179+
startIcon={
180+
apiState.evaluationState?.status ===
181+
ActionStatus.Working ? (
182+
<CircularProgress
183+
color="inherit"
184+
size={20}
185+
/>
186+
) : null
187+
}
168188
variant="contained"
169189
onClick={() => handleRunEnumerations()}
170190
>

thirdeye-ui/src/app/pages/create-alert/sections/aggregation-granularity-detection/granularity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ export const SelectGranularity = (): JSX.Element => {
128128
if (newAlertInsight) {
129129
setAlertInsight(newAlertInsight);
130130
setSelectedTimeRange({
131-
startTime: newAlertInsight.datasetStartTime,
132-
endTime: newAlertInsight.datasetEndTime,
131+
startTime: newAlertInsight.defaultStartTime,
132+
endTime: newAlertInsight.defaultEndTime,
133133
});
134134
}
135135
setWorkingAlert(workingAlertUpdated);

0 commit comments

Comments
 (0)