This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit 7c39511d77a9f195a293809cee0894adbbd4fb7a Author: Mykola Mandra <[email protected]> AuthorDate: Fri Jul 16 18:11:45 2021 +0100 Exclude timezone from date-time query parameters, UTC by default Signed-off-by: Mykola Mandra <[email protected]> --- ui-modules/utils/logbook/logbook.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui-modules/utils/logbook/logbook.js b/ui-modules/utils/logbook/logbook.js index 9115254..62239da 100644 --- a/ui-modules/utils/logbook/logbook.js +++ b/ui-modules/utils/logbook/logbook.js @@ -210,8 +210,10 @@ export function logbook() { return; } - let dateFrom = $scope.search.dateTimeFrom && new Date($scope.search.dateTimeFrom).toISOString(); - let dateTimeTo = $scope.search.dateTimeTo && new Date($scope.search.dateTimeTo).toISOString(); + // Exclude timezone from date-times. + const ISO_DATETIME_LENGTH = '0000-00-00T00:00:00.000'.length; + let dateFrom = $scope.search.dateTimeFrom && new Date($scope.search.dateTimeFrom).toISOString().slice(0, ISO_DATETIME_LENGTH); + let dateTimeTo = $scope.search.dateTimeTo && new Date($scope.search.dateTimeTo).toISOString().slice(0, ISO_DATETIME_LENGTH); const levels = getCheckedBoxes($scope.search.logLevels); @@ -220,7 +222,7 @@ export function logbook() { tail: $scope.search.latest, searchPhrase: $scope.search.phrase, numberOfItems: $scope.search.numberOfItems, - dateTimeFrom: isTail() && !isNewQueryParameters ? $scope.logEntries.slice(-1)[0].timestamp : dateFrom, + dateTimeFrom: isTail() && !isNewQueryParameters ? $scope.logEntries.slice(-1)[0].timestamp.replace(',', '.') : dateFrom, dateTimeTo: dateTimeTo, } @@ -241,6 +243,7 @@ export function logbook() { // Append all new log entries, there is no overlap. $scope.logEntries = $scope.logEntries.concat(newLogEntries) + } // Display not more of lines than was requested.
