mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 22:25:52 -05:00
Web Power Switch operations are now logged.
This commit is contained in:
parent
58d97515ab
commit
935ad09129
@ -2902,7 +2902,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
if (node.mtype == 4) {
|
||||
// Send out an event to perform turn off command on the port
|
||||
//var targets = parent.CreateNodeDispatchTargets(node.meshid, node._id, ['devport-operation', 'server-users', user._id]);
|
||||
var event = { etype: 'node', userid: user._id, username: user.name, nodeid: node._id, action: 'turnon', domain: domain.id, nolog: 1, portid: node.portid, porttype: node.porttype, portnum: node.portnum, meshid: node.meshid, mtype: node.mtype };
|
||||
const event = { etype: 'node', userid: user._id, username: user.name, nodeid: node._id, action: 'turnon', domain: domain.id, portid: node.portid, porttype: node.porttype, portnum: node.portnum, meshid: node.meshid, mtype: node.mtype, msgid: 132, msg: "Turn on." };
|
||||
parent.parent.DispatchEvent([ 'devport-operation' ], obj, event);
|
||||
return;
|
||||
}
|
||||
@ -3072,7 +3072,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
if (node.mtype == 4) {
|
||||
// Send out an event to perform turn off command on the port
|
||||
//var targets = parent.CreateNodeDispatchTargets(node.meshid, node._id, ['devport-operation', 'server-users', user._id]);
|
||||
var event = { etype: 'node', userid: user._id, username: user.name, nodeid: node._id, action: 'turnoff', domain: domain.id, nolog: 1, portid: node.portid, porttype: node.porttype, portnum: node.portnum, meshid: node.meshid, mtype: node.mtype };
|
||||
var event = { etype: 'node', userid: user._id, username: user.name, nodeid: node._id, action: 'turnoff', domain: domain.id, portid: node.portid, porttype: node.porttype, portnum: node.portnum, meshid: node.meshid, mtype: node.mtype, msgid: 133, msg: "Turn off." };
|
||||
parent.parent.DispatchEvent([ 'devport-operation' ], obj, event);
|
||||
return;
|
||||
}
|
||||
|
@ -13348,7 +13348,9 @@
|
||||
128: "Account created, name is {0}.",
|
||||
129: "Removed account display name.",
|
||||
130: "User notifications changed",
|
||||
131: "Added device share {0} with unlimited time."
|
||||
131: "Added device share {0} with unlimited time.",
|
||||
132: "Turn on.",
|
||||
133: "Turn off."
|
||||
};
|
||||
|
||||
// Highlights the device being hovered
|
||||
|
Loading…
Reference in New Issue
Block a user