From 9586b86519ef293b2d55980f833dfa0bb76c7ac2 Mon Sep 17 00:00:00 2001 From: Rodrigo Pastrana Date: Wed, 26 Jun 2024 18:58:57 -0400 Subject: [PATCH] HPCC-32163 Zap LogFilter Absolute Time Range Fix - Fixes absolute time range param name - Fixes erroneous time range param test Signed-off-by: Rodrigo Pastrana --- esp/services/ws_workunits/ws_workunitsHelpers.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/esp/services/ws_workunits/ws_workunitsHelpers.hpp b/esp/services/ws_workunits/ws_workunitsHelpers.hpp index 5305b0dec1a..8ceafe5864d 100644 --- a/esp/services/ws_workunits/ws_workunitsHelpers.hpp +++ b/esp/services/ws_workunits/ws_workunitsHelpers.hpp @@ -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!"); } } @@ -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);