1
0
Fork 0
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:
Ylian Saint-Hilaire 2019-09-24 10:34:33 -07:00
parent c331681ad1
commit b87b5e93a4
9 changed files with 55 additions and 21 deletions

View file

@ -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': {