From 316c7b4dea5bfe5b915123fd08f4034f1ce40871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20=C3=81ngel?= Date: Tue, 24 Jul 2018 15:08:37 +0200 Subject: [PATCH] Filtering syscollector output --- public/controllers/agents.js | 11 +++++++--- .../templates/agents/agents-syscollector.html | 20 +++++++++++++++---- public/templates/agents/agents.head | 2 +- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/public/controllers/agents.js b/public/controllers/agents.js index 52a8e891e..9dfd1712b 100644 --- a/public/controllers/agents.js +++ b/public/controllers/agents.js @@ -192,9 +192,14 @@ function ( $scope.switchTab($scope.tab, true); - $scope.syscollector = { - hardware: data[3].data.data, - os: data[4].data.data + if(!data[3] || !data[3].data || !data[3].data.data || typeof data[3].data.data !== 'object' || !Object.keys(data[3].data.data).length || + !data[4] || !data[4].data || !data[4].data.data || typeof data[4].data.data !== 'object' || !Object.keys(data[4].data.data).length){ + $scope.syscollector = null; + } else { + $scope.syscollector = { + hardware: data[3].data.data, + os: data[4].data.data + }; } $scope.load = false; diff --git a/public/templates/agents/agents-syscollector.html b/public/templates/agents/agents-syscollector.html index 3b582d35d..453395882 100644 --- a/public/templates/agents/agents-syscollector.html +++ b/public/templates/agents/agents-syscollector.html @@ -1,5 +1,17 @@ -
+
+ + + Inventory disabled + +
+

Inventory (syscollector) is disabled for this agent. Visit the documentation on this link to learn about how to enable it. +

+
+
+
+
+
OS information @@ -31,7 +43,7 @@ - + Hardware information @@ -55,7 +67,7 @@
-
+
-
+
General File integrity Configuration - Inventory + Inventory