Skip to content

Commit

Permalink
HPCC-32835 ECL Watch v9 ZAP dialog default relative time
Browse files Browse the repository at this point in the history
fixes an issue where the ZAP dialog could not be submitted without
specifiying some kind of time range for logs; now defaulting to
a 24 hour window surrounding the WU start time

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Oct 18, 2024
1 parent 4a7afe3 commit b8a7e92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions esp/src/src-react/components/forms/ZAPDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const defaultValues: ZAPDialogValues = {
StartDate: "",
EndDate: "",
},
RelativeTimeRangeBuffer: "",
RelativeTimeRangeBuffer: "43200",
LineLimit: "10000",
LineStartFrom: "0",
SelectColumnMode: ColumnMode.DEFAULT,
Expand Down Expand Up @@ -196,8 +196,11 @@ export const ZAPDialog: React.FunctionComponent<ZAPDialogProps> = ({
if (key === "AbsoluteTimeRange") {
const startDate = logFilter.AbsoluteTimeRange.StartDate ? new Date(logFilter.AbsoluteTimeRange.StartDate).toISOString() : "";
const endDate = logFilter.AbsoluteTimeRange.EndDate ? new Date(logFilter.AbsoluteTimeRange.EndDate).toISOString() : "";
formData.append("LogFilter_AbsoluteTimeRange_StartDate", startDate);
formData.append("LogFilter_AbsoluteTimeRange_EndDate", endDate);
if (startDate && endDate) {
formData.append("LogFilter_AbsoluteTimeRange_StartDate", startDate);
formData.append("LogFilter_AbsoluteTimeRange_EndDate", endDate);
delete logFilter.RelativeTimeRangeBuffer;
}
} else {
formData.append(`LogFilter_${key}`, logFilter[key]);
}
Expand Down

0 comments on commit b8a7e92

Please sign in to comment.