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 d0697d7933f8a74ae8dc9bfffc3033c352b16bc5
Author: Mykola Mandra <[email protected]>
AuthorDate: Fri Jul 16 17:23:49 2021 +0100

    Switch to timestamp in ISO format in the query
    
    Signed-off-by: Mykola Mandra <[email protected]>
---
 ui-modules/utils/logbook/logbook.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ui-modules/utils/logbook/logbook.js 
b/ui-modules/utils/logbook/logbook.js
index f685921..9115254 100644
--- a/ui-modules/utils/logbook/logbook.js
+++ b/ui-modules/utils/logbook/logbook.js
@@ -210,6 +210,9 @@ 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();
+
             const levels = getCheckedBoxes($scope.search.logLevels);
 
             const params = {
@@ -217,8 +220,8 @@ export function logbook() {
                 tail: $scope.search.latest,
                 searchPhrase: $scope.search.phrase,
                 numberOfItems: $scope.search.numberOfItems,
-                dateTimeFrom: isTail() && !isNewQueryParameters ? 
getLogEntryTimestamp($scope.logEntries.slice(-1)[0]) : 
$scope.search.dateTimeFrom,
-                dateTimeTo: $scope.search.dateTimeTo,
+                dateTimeFrom: isTail() && !isNewQueryParameters ? 
$scope.logEntries.slice(-1)[0].timestamp : dateFrom,
+                dateTimeTo: dateTimeTo,
             }
 
             logbookApi.logbookQuery(params, true).then((newLogEntries) => {

Reply via email to