From d16a6bf1713aaf0f2672af9341f02c31199f4ef3 Mon Sep 17 00:00:00 2001 From: johaoRosasRosillo Date: Fri, 4 Feb 2022 14:00:34 -0300 Subject: [PATCH 1/2] comment delete properties for trak_hardware_changs --- lib/agent/providers/hardware/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/agent/providers/hardware/index.js b/lib/agent/providers/hardware/index.js index 36832448c..347059e9c 100644 --- a/lib/agent/providers/hardware/index.js +++ b/lib/agent/providers/hardware/index.js @@ -81,9 +81,9 @@ exp.get_first_mac_address = function(callback) { exp.get_ram_module_list = os_functions.get_ram_module_list; exp.track_hardware_changes = (data) => { - if (data.tpm_module) delete data.tpm_module; - if (data.os_edition) delete data.os_edition; - if (data.winsvc_version) delete data.winsvc_version; + //if (data.tpm_module) delete data.tpm_module; + //if (data.os_edition) delete data.os_edition; + //if (data.winsvc_version) delete data.winsvc_version; var diff_count = 0; var save_data = () => { From 1cbcb812ebe4dbfdd01cf5d848ba3590c7b8f14f Mon Sep 17 00:00:00 2001 From: johaoRosasRosillo Date: Mon, 7 Feb 2022 08:56:39 -0500 Subject: [PATCH 2/2] fix send information to panel --- lib/agent/plugins/control-panel/index.js | 5 ++++- lib/agent/providers/hardware/index.js | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/agent/plugins/control-panel/index.js b/lib/agent/plugins/control-panel/index.js index 3837b0b14..bc35829c0 100644 --- a/lib/agent/plugins/control-panel/index.js +++ b/lib/agent/plugins/control-panel/index.js @@ -73,8 +73,11 @@ function load_hooks() { hooks.on('event', sender.notify_event) hooks.on('data', sender.send_data) hooks.on('report', (name, data) => { + let data_to_send_panel = {  + ...data + } if (name == 'specs') hardware.track_hardware_changes(data); - sender.send_report(name, data) + sender.send_report(name, data_to_send_panel) }); // this is triggered from this own plugin's sender module diff --git a/lib/agent/providers/hardware/index.js b/lib/agent/providers/hardware/index.js index 347059e9c..76a1ef2c6 100644 --- a/lib/agent/providers/hardware/index.js +++ b/lib/agent/providers/hardware/index.js @@ -81,9 +81,10 @@ exp.get_first_mac_address = function(callback) { exp.get_ram_module_list = os_functions.get_ram_module_list; exp.track_hardware_changes = (data) => { - //if (data.tpm_module) delete data.tpm_module; - //if (data.os_edition) delete data.os_edition; - //if (data.winsvc_version) delete data.winsvc_version; + if (data.tpm_module) delete data.tpm_module; + if (data.os_edition) delete data.os_edition; + if (data.winsvc_version) delete data.winsvc_version; + if (data.rp_module) delete data.rp_module; var diff_count = 0; var save_data = () => {