diff --git a/public/controllers/agents.js b/public/controllers/agents.js index bec7188fdf..d03b8893e9 100644 --- a/public/controllers/agents.js +++ b/public/controllers/agents.js @@ -47,7 +47,14 @@ app.controller('agentsController', scapLastScore : '[vis-id="\'Wazuh-App-Agents-OSCAP-Last-score\'"]', scapHighestScore: '[vis-id="\'Wazuh-App-Agents-OSCAP-Higher-score-metric\'"]', scapLowestScore : '[vis-id="\'Wazuh-App-Agents-OSCAP-Lower-score-metric\'"]' - } + } + + // Metrics Virustotal + const metricsVirustotal = { + virusMalicious: '[vis-id="\'Wazuh-App-Overview-Virustotal-Total-Malicious\'"]', + virusPositives: '[vis-id="\'Wazuh-App-Overview-Virustotal-Total-Positives\'"]', + virusTotal : '[vis-id="\'Wazuh-App-Overview-Virustotal-Total\'"]' + } $rootScope.tabVisualizations = { general : 7, @@ -76,16 +83,21 @@ app.controller('agentsController', const checkMetrics = (tab,subtab) => { metricService.destroyWatchers(); - if(tab === 'audit' && subtab === 'panels'){ - metricService.createWatchers(metricsAudit); - } - - if(tab === 'vuls' && subtab === 'panels'){ - metricService.createWatchers(metricsVulnerability); - } - - if(tab === 'oscap' && subtab === 'panels'){ - metricService.createWatchers(metricsScap); + if(subtab === 'panels'){ + switch (tab) { + case 'audit': + metricService.createWatchers(metricsAudit); + break; + case 'vuls': + metricService.createWatchers(metricsVulnerability); + break; + case 'oscap': + metricService.createWatchers(metricsScap); + break; + case 'virustotal': + metricService.createWatchers(metricsVirustotal); + break; + } } if(!$rootScope.$$phase) $rootScope.$digest(); diff --git a/public/controllers/overview.js b/public/controllers/overview.js index 8b496e7149..6b365e625b 100644 --- a/public/controllers/overview.js +++ b/public/controllers/overview.js @@ -43,6 +43,21 @@ app.controller('overviewController', function ($scope, $location, $rootScope, ap scapLowestScore : '[vis-id="\'Wazuh-App-Overview-OSCAP-Lowest-score\'"]' } + // Metrics Virustotal + const metricsVirustotal = { + virusMalicious: '[vis-id="\'Wazuh-App-Overview-Virustotal-Total-Malicious\'"]', + virusPositives: '[vis-id="\'Wazuh-App-Overview-Virustotal-Total-Positives\'"]', + virusTotal : '[vis-id="\'Wazuh-App-Overview-Virustotal-Total\'"]' + } + + // Metrics AWS + const metricsAws = { + awsLogins :'[vis-id="\'Wazuh-App-Overview-AWS-Metric-Successful-logins\'"]', + awsMostActiveUser:'[vis-id="\'Wazuh-App-Overview-AWS-Most-active-user\'"]', + awsAuthorized :'[vis-id="\'Wazuh-App-Overview-AWS-Metric-Authorize-security\'"]', + awsRevoked :'[vis-id="\'Wazuh-App-Overview-AWS-Metric-Revoke-security\'"]' + } + // Check the url hash and retrieve the tabView information if ($location.search().tabView) { $scope.tabView = $location.search().tabView; @@ -90,24 +105,31 @@ app.controller('overviewController', function ($scope, $location, $rootScope, ap const checkMetrics = (tab,subtab) => { metricService.destroyWatchers(); - if(tab === 'general' && subtab === 'panels'){ - metricService.createWatchers(metricsGeneral); - } - if(tab === 'fim' && subtab === 'panels'){ - metricService.createWatchers(metricsFim); - } - - if(tab === 'audit' && subtab === 'panels'){ - metricService.createWatchers(metricsAudit); - } - - if(tab === 'vuls' && subtab === 'panels'){ - metricService.createWatchers(metricsVulnerability); - } - - if(tab === 'oscap' && subtab === 'panels'){ - metricService.createWatchers(metricsScap); + if(subtab === 'panels'){ + switch (tab) { + case 'general': + metricService.createWatchers(metricsGeneral); + break; + case 'fim': + metricService.createWatchers(metricsFim); + break; + case 'audit': + metricService.createWatchers(metricsAudit); + break; + case 'vuls': + metricService.createWatchers(metricsVulnerability); + break; + case 'oscap': + metricService.createWatchers(metricsScap); + break; + case 'virustotal': + metricService.createWatchers(metricsVirustotal); + break; + case 'aws': + metricService.createWatchers(metricsAws); + break; + } } if(!$rootScope.$$phase) $rootScope.$digest(); diff --git a/public/templates/agents-prev/agents-prev.html b/public/templates/agents-prev/agents-prev.html index 44c51ab509..34a8e4a5eb 100644 --- a/public/templates/agents-prev/agents-prev.html +++ b/public/templates/agents-prev/agents-prev.html @@ -33,12 +33,12 @@ Top
-

Last registered agent

-

{{lastAgent.name}}

+

Last registered agent

+

{{lastAgent.name}}

-

Higher activity

-

{{mostActiveAgent.name}}

+

Higher activity

+

{{mostActiveAgent.name}}

diff --git a/public/templates/agents/agents-virustotal.html b/public/templates/agents/agents-virustotal.html index 1b51db4fd0..0f0da5f819 100644 --- a/public/templates/agents/agents-virustotal.html +++ b/public/templates/agents/agents-virustotal.html @@ -3,24 +3,22 @@
-
- - - - - - - - - - - - - +
+ + +
Total malicious: {{virusMalicious}}
+
Total positives: {{virusPositives}}
+
Total: {{virusTotal}}
+
+ + + +
+
diff --git a/public/templates/manager/ruleset/ruleset-decoders.html b/public/templates/manager/ruleset/ruleset-decoders.html index 77b63159b4..8e6dde6aca 100644 --- a/public/templates/manager/ruleset/ruleset-decoders.html +++ b/public/templates/manager/ruleset/ruleset-decoders.html @@ -56,17 +56,17 @@ Search: {{decoders.getFilter('search')}} - + File: {{decoders.getFilter('file')}} - + Path: {{decoders.getFilter('path')}} - + diff --git a/public/templates/manager/ruleset/ruleset-rules.html b/public/templates/manager/ruleset/ruleset-rules.html index e19841b768..48931a0549 100644 --- a/public/templates/manager/ruleset/ruleset-rules.html +++ b/public/templates/manager/ruleset/ruleset-rules.html @@ -85,27 +85,27 @@ Search: {{rules.getFilter('search')}} - + File: {{rules.getFilter('file')}} - + Level: {{rules.getFilter('level')}} - + Group: {{rules.getFilter('group')}} - + PCI control: {{rules.getFilter('pci')}} - + diff --git a/public/templates/overview/overview-aws.html b/public/templates/overview/overview-aws.html index ff4ce937dd..dc5f8cee93 100644 --- a/public/templates/overview/overview-aws.html +++ b/public/templates/overview/overview-aws.html @@ -3,6 +3,24 @@
+
+ + +
Successful logins: {{awsLogins}}
+
Most active user: {{awsMostActiveUser}}
+
Authorized security groups: {{awsAuthorized}}
+
Revoked security groups: {{awsRevoked}}
+
+
+
+ +
+ + + + +
+
@@ -13,34 +31,9 @@
-
- - - - - - - -
Most active user
- -
-
-
-
- - - - - - - - - - -
diff --git a/public/templates/overview/overview-virustotal.html b/public/templates/overview/overview-virustotal.html index 6754886b87..846639c56c 100644 --- a/public/templates/overview/overview-virustotal.html +++ b/public/templates/overview/overview-virustotal.html @@ -1,36 +1,24 @@
-
-
-
- - - - - - -
- -
+
+ + +
Total malicious: {{virusMalicious}}
+
Total positives: {{virusPositives}}
+
Total: {{virusTotal}}
+
+
+
- - - - - -
-
+
+ + + +
- - - - - -
-
+
- Unique malicious files per agent @@ -51,8 +39,6 @@
- -