mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added MySQL/MariaDB support for reports.
This commit is contained in:
parent
a15a5e779d
commit
ce8b2a6bd8
2 changed files with 18 additions and 0 deletions
|
@ -5420,6 +5420,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
if ((user.siteadmin & SITERIGHT_MANAGEUSERS) != 0) { ids = ['*']; }
|
||||
|
||||
// Get the events in the time range
|
||||
// MySQL or MariaDB query will ignore the MsgID filter.
|
||||
db.GetEventsTimeRange(ids, domain.id, [5, 10, 12], new Date(command.start * 1000), new Date(command.end * 1000), function (err, docs) {
|
||||
if (err != null) return;
|
||||
var data = { groups: {} };
|
||||
|
@ -5437,6 +5438,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
|
||||
// Rows
|
||||
for (var i in docs) {
|
||||
if ((docs[i].msgid != 5) && (docs[i].msgid != 10) && (docs[i].msgid != 12)) continue; // If MySQL or MariaDB query, we can't filter on MsgID, so we have to do it here.
|
||||
|
||||
var entry = { time: docs[i].time.valueOf() };
|
||||
|
||||
// UserID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue