mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
add filter for events (#5975)
* add filter to node events * add filter to my events * add filter to user events * improve sql querys Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -470,6 +470,17 @@
|
||||
<input type="button" style="display:none" value="Download Report" onclick=p3showReportDialog() />
|
||||
</td>
|
||||
<td class="auto-style1">
|
||||
Filter
|
||||
<select id=p3filterevents onchange=refreshEvents()>
|
||||
<option value=>All Logs</option>
|
||||
<option value=agentlog>Agent Logs</option>
|
||||
<option value=relaylog>Relay Logs</option>
|
||||
<option value=manual>Manual Logs</option>
|
||||
<option value=runcommands>Run Command Logs</option>
|
||||
<option value=batchupload>Batch Upload Logs</option>
|
||||
<option value=changenode>Change Node Logs</option>
|
||||
<option value=removenode>Remove Node Logs</option>
|
||||
</select>
|
||||
Show
|
||||
<select id=p3limitdropdown onchange=refreshEvents()>
|
||||
<option value=60>Last 60</option>
|
||||
@@ -975,6 +986,17 @@
|
||||
<td class="h1"></td>
|
||||
<!--<td> <input type=button onclick=refreshDeviceEvents() value="Refresh" /></td>-->
|
||||
<td class="auto-style1">
|
||||
Filter
|
||||
<select id=p16filterevents onchange=refreshDeviceEvents()>
|
||||
<option value=>All Logs</option>
|
||||
<option value=agentlog>Agent Logs</option>
|
||||
<option value=relaylog>Relay Logs</option>
|
||||
<option value=manual>Manual Logs</option>
|
||||
<option value=runcommands>Run Command Logs</option>
|
||||
<option value=batchupload>Batch Upload Logs</option>
|
||||
<option value=changenode>Change Node Logs</option>
|
||||
<option value=removenode>Remove Node Logs</option>
|
||||
</select>
|
||||
Show
|
||||
<select id=p16limitdropdown onchange=refreshDeviceEvents()>
|
||||
<option value=60>Last 60</option>
|
||||
@@ -1104,6 +1126,17 @@
|
||||
<td class="h1"></td>
|
||||
<!--<td> <input type=button onclick=refreshUsersEvents() value="Refresh" /></td>-->
|
||||
<td class="auto-style1">
|
||||
Filter
|
||||
<select id=p31filterevents onchange=refreshUsersEvents()>
|
||||
<option value=>All Logs</option>
|
||||
<option value=agentlog>Agent Logs</option>
|
||||
<option value=relaylog>Relay Logs</option>
|
||||
<option value=manual>Manual Logs</option>
|
||||
<option value=runcommands>Run Command Logs</option>
|
||||
<option value=batchupload>Batch Upload Logs</option>
|
||||
<option value=changenode>Change Node Logs</option>
|
||||
<option value=removenode>Remove Node Logs</option>
|
||||
</select>
|
||||
Show
|
||||
<select id=p31limitdropdown onchange=refreshUsersEvents()>
|
||||
<option value=60>Last 60</option>
|
||||
@@ -11714,7 +11747,11 @@
|
||||
}
|
||||
|
||||
function refreshDeviceEvents() {
|
||||
meshserver.send({ action: 'events', nodeid: currentNode._id, limit: parseInt(p16limitdropdown.value) });
|
||||
if (p16filterevents.value != "") {
|
||||
meshserver.send({ action: 'events', nodeid: currentNode._id, limit: parseInt(p16limitdropdown.value), filter: p16filterevents.value });
|
||||
} else {
|
||||
meshserver.send({ action: 'events', nodeid: currentNode._id, limit: parseInt(p16limitdropdown.value) });
|
||||
}
|
||||
}
|
||||
|
||||
function showEventDetails(h, mode) {
|
||||
@@ -15063,7 +15100,11 @@
|
||||
}
|
||||
|
||||
function refreshEvents() {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p3limitdropdown.value) });
|
||||
if (p3filterevents.value != "") {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p3limitdropdown.value), filter: p3filterevents.value });
|
||||
} else {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p3limitdropdown.value) });
|
||||
}
|
||||
}
|
||||
|
||||
function p3showReportDialog() {
|
||||
@@ -16939,7 +16980,11 @@
|
||||
}
|
||||
|
||||
function refreshUsersEvents() {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p31limitdropdown.value), userid: currentUser._id });
|
||||
if (p31filterevents.value != "") {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p31limitdropdown.value), userid: currentUser._id, filter: p31filterevents.value });
|
||||
} else {
|
||||
meshserver.send({ action: 'events', limit: parseInt(p31limitdropdown.value), userid: currentUser._id });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user