mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added AgentIssues command to server console.
This commit is contained in:
parent
e2b7d38bc8
commit
45e3b8efed
3 changed files with 29 additions and 1 deletions
|
@ -308,6 +308,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
createMeshAgentCount: 0,
|
||||
agentClose: 0,
|
||||
agentBinaryUpdate: 0,
|
||||
agentMeshCoreBinaryUpdate: 0,
|
||||
coreIsStableCount: 0,
|
||||
verifiedAgentConnectionCount: 0,
|
||||
clearingCoreCount: 0,
|
||||
|
@ -331,6 +332,11 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
}
|
||||
obj.getAgentStats = function () { return obj.agentStats; }
|
||||
|
||||
// Keep a record of the last agent issues.
|
||||
obj.getAgentIssues = function () { return obj.agentIssues; }
|
||||
obj.setAgentIssue = function (agent, issue) { obj.agentIssues.push([new Date().toLocaleTimeString(), agent.remoteaddrport, issue]); while (obj.setAgentIssue.length > 50) { obj.agentIssues.shift(); } }
|
||||
obj.agentIssues = [];
|
||||
|
||||
// Authenticate the user
|
||||
obj.authenticate = function (name, pass, domain, fn) {
|
||||
if ((typeof (name) != 'string') || (typeof (pass) != 'string') || (typeof (domain) != 'object')) { fn(new Error('invalid fields')); return; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue