mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Sysinfo doc now live update, improved 2FA backup codes dialog.
This commit is contained in:
parent
c331681ad1
commit
b87b5e93a4
9 changed files with 55 additions and 21 deletions
17
meshagent.js
17
meshagent.js
|
@ -1307,12 +1307,17 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
break;
|
||||
}
|
||||
case 'sysinfo': {
|
||||
//console.log('sysinfo', obj.nodeid, JSON.stringify(command.data.hash));
|
||||
command.data._id = 'si' + obj.dbNodeKey;
|
||||
command.data.type = 'sysinfo';
|
||||
command.data.domain = domain.id;
|
||||
command.data.time = Date.now();
|
||||
db.Set(command.data); // Update system information in the database.
|
||||
if ((typeof command.data == 'object') && (typeof command.data.hash == 'string')) {
|
||||
command.data._id = 'si' + obj.dbNodeKey;
|
||||
command.data.type = 'sysinfo';
|
||||
command.data.domain = domain.id;
|
||||
command.data.time = Date.now();
|
||||
db.Set(command.data); // Update system information in the database.
|
||||
|
||||
// Event the new sysinfo hash, this will notify everyone that the sysinfo document was changed
|
||||
var event = { etype: 'node', action: 'sysinfohash', nodeid: obj.dbNodeKey, domain: domain.id, hash: command.data.hash, nolog: 1 };
|
||||
parent.parent.DispatchEvent(['*', obj.dbMeshKey], obj, event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'sysinfocheck': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue