1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Split SMBIOS information into seperate collection.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-25 11:13:13 -08:00
parent 0865403772
commit 5d1423cbaf
36 changed files with 41 additions and 11 deletions

View file

@ -73,7 +73,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
obj.db.Remove('if' + obj.dbNodeKey); // Remove interface information
obj.db.Remove('nt' + obj.dbNodeKey); // Remove notes
obj.db.Remove('lc' + obj.dbNodeKey); // Remove last connect time
obj.db.Remove('sm' + obj.dbNodeKey); // Remove SMBios data
obj.db.RemoveSMBIOS(obj.dbNodeKey); // Remove SMBios data
obj.db.RemoveNode(obj.dbNodeKey); // Remove all entries with node:id
// Event node deletion
@ -893,8 +893,8 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
}
case 'smbios':
{
// The RAW SMBios table of this computer
obj.db.Set({ _id: 'sm' + obj.dbNodeKey, type: 'smbios', domain: domain.id, time: Date.now(), smbios: command.value });
// Store the RAW SMBios table of this computer
obj.db.SetSMBIOS({ _id: obj.dbNodeKey, domain: domain.id, time: new Date(), value: JSON.stringify(command.value) });
// Event the node interface information change (This is a lot of traffic, probably don't need this).
//obj.parent.parent.DispatchEvent(['*', obj.meshid], obj, { action: 'smBiosChange', nodeid: obj.dbNodeKey, domain: domain.id, smbios: command.value, nolog: 1 });