Skip to content

Commit

Permalink
fix new events appearing when filtered #6189
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Jun 20, 2024
1 parent 46ebadf commit 6b21bac
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions views/default.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -3131,10 +3131,12 @@
if (!message.event.nolog) {
if (currentNode && (message.event.nodeid == currentNode._id) && (currentDeviceEvents != null)) {
// If this event has a nodeid and we are looking at this node, update the log in real time.
currentDeviceEvents.unshift(message.event);
var eventLimit = parseInt(p16limitdropdown.value);
while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
mainUpdate(1024);
if ((message.event.action == p16filterevents.value) || (p16filterevents.value == "")) {
currentDeviceEvents.unshift(message.event);
var eventLimit = parseInt(p16limitdropdown.value);
while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
mainUpdate(1024);
}
}

if (currentUser && (message.event.userid == currentUser._id)) {
Expand All @@ -3146,10 +3148,12 @@
}

// Add this event to the main events log.
events.unshift(message.event);
var eventLimit = parseInt(p3limitdropdown.value);
while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
mainUpdate(32);
if ((message.event.action == p3filterevents.value) || (p3filterevents.value == "")) {
events.unshift(message.event);
var eventLimit = parseInt(p3limitdropdown.value);
while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
mainUpdate(32);
}
}
if (message.event.noact) break; // Take no action on this event

Expand Down

0 comments on commit 6b21bac

Please sign in to comment.