algairim commented on a change in pull request #243:
URL: https://github.com/apache/brooklyn-ui/pull/243#discussion_r668523710



##########
File path: ui-modules/utils/logbook/logbook.js
##########
@@ -177,9 +177,27 @@ export function logbook() {
 
             logbookApi.logbookQuery(params, true).then((logEntries) => {
 
-                // TODO: implement logic for make output as table.
+                if ($scope.isLatest && $scope.logEntries.length !== 0) {
+                    if (logEntries.length > 0) {
+
+                        // Calculate date-time to display up to. Note, 
calendar does not take into account milliseconds,
+                        // round down to seconds.
+                        let latestDateTimeToDisplay = 
Math.floor(logEntries.slice(-1)[0].datetime / DEFAULT_NUMBER_OF_ITEMS) * 
DEFAULT_NUMBER_OF_ITEMS;
+
+                        // Display new log entries.
+                        let newLogEntries = logEntries.filter(entry => 
entry.datetime <= latestDateTimeToDisplay);

Review comment:
       Noted




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to