mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-09 13:39:42 -05:00
Added DropAllCira command to server console, #2976
This commit is contained in:
@@ -5448,6 +5448,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
'dbcounters': [serverUserCommandDbCounters, ""],
|
||||
'dbstats': [serverUserCommandDbStats, ""],
|
||||
'dispatchtable': [serverUserCommandDispatchTable, ""],
|
||||
'dropallcira': [serverUserCommandDropAllCira, ""],
|
||||
'dupagents': [serverUserCommandDupAgents, ""],
|
||||
'email': [serverUserCommandEmail, ""],
|
||||
'firebase': [serverUserCommandFirebase, ""],
|
||||
@@ -5854,6 +5855,12 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
}
|
||||
}
|
||||
|
||||
function serverUserCommandDropAllCira(cmdData) {
|
||||
if (parent.parent.mpsserver == null) { cmdData.result = 'MPS not setup.'; return; }
|
||||
const dropCount = parent.parent.mpsserver.dropAllConnections();
|
||||
cmdData.result = 'Dropped ' + dropCount + ' connection(s).';
|
||||
}
|
||||
|
||||
function serverUserCommandDupAgents(cmdData) {
|
||||
for (var i in parent.duplicateAgentsLog) {
|
||||
cmdData.result += JSON.stringify(parent.duplicateAgentsLog[i]) + '\r\n';
|
||||
|
||||
Reference in New Issue
Block a user