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

Improved MEI/SMBios in meshcore.js

This commit is contained in:
Ylian Saint-Hilaire 2018-09-27 16:17:05 -07:00
parent 0cbd98e7d6
commit 5f84e4f4ba
4 changed files with 78 additions and 57 deletions

8
db.js
View file

@ -129,9 +129,11 @@ module.exports.CreateDB = function (parent) {
obj.file.count({ type: 'user' }, function (err, userCount) {
obj.file.count({ type: 'ifinfo' }, function (err, nodeInterfaceCount) {
obj.file.count({ type: 'note' }, function (err, noteCount) {
obj.file.count({ type: 'lastconnect' }, function (err, nodeLastConnectCount) {
obj.file.count({ }, function (err, totalCount) {
func({ nodes: nodeCount, meshes: meshCount, powerEvents: powerCount, users: userCount, nodeInterfaces: nodeInterfaceCount, notes: noteCount, connectEvent: nodeLastConnectCount, total: totalCount });
obj.file.count({ type: 'smbios' }, function (err, nodeSmbiosCount) {
obj.file.count({ type: 'lastconnect' }, function (err, nodeLastConnectCount) {
obj.file.count({ }, function (err, totalCount) {
func({ nodes: nodeCount, meshes: meshCount, powerEvents: powerCount, users: userCount, nodeInterfaces: nodeInterfaceCount, notes: noteCount, connectEvent: nodeLastConnectCount, smbios: nodeSmbiosCount, total: totalCount });
});
});
});
});