Skip to content

Commit

Permalink
Merge pull request #18817 from rpastrana/HPCC-32163-ZapTimeRangeFix
Browse files Browse the repository at this point in the history
HPCC-32163 Zap LogFilter Absolute Time Range Fix
  • Loading branch information
GordonSmith authored Jul 4, 2024
2 parents 96c8b05 + 9586b86 commit 9b7612b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions esp/services/ws_workunits/ws_workunitsHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ struct WUComponentLogOptions
}
else if (!isEmptyString(end))
{
if (isEmptyString(end))
if (isEmptyString(start))
throw makeStringException(ECLWATCH_INVALID_INPUT, "ZapLogFilter: Empty 'Absolute TimeRange Start' detected!");
}
else
{
if (relativeTimeBufferSecs > 0 )
wuLogSearchTimeBuffSecs = relativeTimeBufferSecs;
else
throw makeStringException(ECLWATCH_INVALID_INPUT, "ZapLogFilter: Invalid 'TimeRange' detected!");
}
}

Expand All @@ -206,9 +208,9 @@ struct WUComponentLogOptions
logDataFormat = logAccessFormatFromName(requestedLogDataFormat.str());

StringBuffer start; // Absolute query time range start in YYYY-DD-MMTHH:MM:SS
zapHttpRequest->getParameter("LogFilter_AbsoluteTimeRange_Start", start);
zapHttpRequest->getParameter("LogFilter_AbsoluteTimeRange_StartDate", start);
StringBuffer end; // Absolute query time range end in YYYY-DD-MMTHH:MM:SS
zapHttpRequest->getParameter("LogFilter_AbsoluteTimeRange_End", end);
zapHttpRequest->getParameter("LogFilter_AbsoluteTimeRange_EndDate", end);
// Query time range based on WU Time +- Buffer in seconds
unsigned bufferSecs = (unsigned)zapHttpRequest->getParameterInt("LogFilter_RelativeTimeRangeBuffer", 0);

Expand Down

0 comments on commit 9b7612b

Please sign in to comment.