mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 19:11:51 +00:00
fix new events appearing when filtered #6189
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
46ebadf440
commit
6b21bacad2
1 changed files with 12 additions and 8 deletions
|
@ -3131,11 +3131,13 @@
|
||||||
if (!message.event.nolog) {
|
if (!message.event.nolog) {
|
||||||
if (currentNode && (message.event.nodeid == currentNode._id) && (currentDeviceEvents != null)) {
|
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.
|
// If this event has a nodeid and we are looking at this node, update the log in real time.
|
||||||
|
if ((message.event.action == p16filterevents.value) || (p16filterevents.value == "")) {
|
||||||
currentDeviceEvents.unshift(message.event);
|
currentDeviceEvents.unshift(message.event);
|
||||||
var eventLimit = parseInt(p16limitdropdown.value);
|
var eventLimit = parseInt(p16limitdropdown.value);
|
||||||
while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
|
while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
|
||||||
mainUpdate(1024);
|
mainUpdate(1024);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (currentUser && (message.event.userid == currentUser._id)) {
|
if (currentUser && (message.event.userid == currentUser._id)) {
|
||||||
// If this event has a userid and we are looking at this user, update the log in real time.
|
// If this event has a userid and we are looking at this user, update the log in real time.
|
||||||
|
@ -3146,11 +3148,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add this event to the main events log.
|
// Add this event to the main events log.
|
||||||
|
if ((message.event.action == p3filterevents.value) || (p3filterevents.value == "")) {
|
||||||
events.unshift(message.event);
|
events.unshift(message.event);
|
||||||
var eventLimit = parseInt(p3limitdropdown.value);
|
var eventLimit = parseInt(p3limitdropdown.value);
|
||||||
while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
|
while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
|
||||||
mainUpdate(32);
|
mainUpdate(32);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (message.event.noact) break; // Take no action on this event
|
if (message.event.noact) break; // Take no action on this event
|
||||||
|
|
||||||
switch (message.event.action) {
|
switch (message.event.action) {
|
||||||
|
|
Loading…
Reference in a new issue