diff --git a/public/controllers/manager.js b/public/controllers/manager.js
index d851212e8..483bfebba 100644
--- a/public/controllers/manager.js
+++ b/public/controllers/manager.js
@@ -3,7 +3,7 @@ var kuf = require('plugins/wazuh/utils/kibanaUrlFormatter.js');
// Require config
var app = require('ui/modules').get('app/wazuh', []);
-app.controller('managerController', function ($scope, $route, $q, alertify, sharedProperties, $location, $sce, DataFactory, tabProvider, $filter, $http) {
+app.controller('managerController', function ($scope, $route, $q, alertify, sharedProperties, $location, $sce, DataFactory, tabProvider, $filter, $http, $mdDialog) {
//Initialisation
$scope.load = true;
$scope.menuNavItem = 'manager';
@@ -11,8 +11,8 @@ app.controller('managerController', function ($scope, $route, $q, alertify, shar
$scope.stats = [];
$scope.stats['/top/agent'] = '-';
- $scope.stats['/overview/alerts'] = {"alerts":0,"ip":"-","group":"-"};
- $scope.stats['/overview/fim'] = {"alerts":0,"agent":"-","file":"-"};
+ $scope.stats['/overview/alerts'] = { "alerts": 0, "ip": "-", "group": "-" };
+ $scope.stats['/overview/fim'] = { "alerts": 0, "agent": "-", "file": "-" };
$scope.pageId = (Math.random().toString(36).substring(3));
tabProvider.register($scope.pageId);
@@ -35,6 +35,15 @@ app.controller('managerController', function ($scope, $route, $q, alertify, shar
//Functions
+ $scope.showDialog = function (ev) {
+ $mdDialog.show({
+ contentElement: '#actionsDialog',
+ parent: angular.element(document.body),
+ targetEvent: ev,
+ clickOutsideToClose: true
+ });
+ };
+
$scope.getDaemonStatusClass = function (daemonStatus) {
if (daemonStatus == "running")
return "status green"
@@ -159,15 +168,15 @@ app.controller('managerController', function ($scope, $route, $q, alertify, shar
DataFactory.getAndClean('get', '/manager/status', {})
.then(function (data) {
$scope.daemons = data.data;
- DataFactory.getAndClean('get', '/agents/summary', {})
- .then(function (data) {
- $scope.agentsCountActive = data.data.active;
- $scope.agentsCountDisconnected = data.data.disconnected;
- $scope.agentsCountNeverConnected = data.data.neverConnected;
- $scope.agentsCountTotal = data.data.total;
- loadStats();
- $scope.load = false;
- }, printError);
+ DataFactory.getAndClean('get', '/agents/summary', {})
+ .then(function (data) {
+ $scope.agentsCountActive = data.data.active;
+ $scope.agentsCountDisconnected = data.data.disconnected;
+ $scope.agentsCountNeverConnected = data.data.neverConnected;
+ $scope.agentsCountTotal = data.data.total;
+ loadStats();
+ $scope.load = false;
+ }, printError);
}, printError);
};
@@ -223,7 +232,7 @@ app.controller('managerConfigurationController', function ($scope, $route, $q, a
$scope.load = false;
}, printError);
};
-
+
//Load
load();
diff --git a/public/templates/fim.html b/public/templates/fim.html
index 109473080..ac44d9f1b 100644
--- a/public/templates/fim.html
+++ b/public/templates/fim.html
@@ -194,10 +194,6 @@
- {{ item }} , +
+ {{ item }}
{{ item.timeout }}
- + -Rules group
-{{ item.rules_group }}
+Rules group
+ +{{ group }}
diff --git a/public/templates/manager.html b/public/templates/manager.html index f0f58069d..176e8552e 100644 --- a/public/templates/manager.html +++ b/public/templates/manager.html @@ -3,13 +3,13 @@{{daemon.daemon}}
- - -+ +
Top reporting agent (Today)
+Top reporting agent +
{{stats['/top/agent']}}
Alerts
@@ -106,7 +112,8 @@FIM alerts
@@ -131,5 +138,15 @@ + +