2016-09-16 12:35:56 +00:00
|
|
|
var app = require('ui/modules').get('app/wazuh', []);
|
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewGeneralController', function ($scope, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-16 18:27:53 +00:00
|
|
|
|
2016-09-16 12:35:56 +00:00
|
|
|
$scope.load = true;
|
2017-02-01 21:06:05 +00:00
|
|
|
$scope.$parent.state.setOverviewState('general');
|
2016-11-09 19:10:48 +00:00
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2016-09-17 20:38:31 +00:00
|
|
|
});
|
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewFimController', function ($scope, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-16 18:27:53 +00:00
|
|
|
|
2016-09-17 20:38:31 +00:00
|
|
|
$scope.load = true;
|
2017-02-01 21:06:05 +00:00
|
|
|
$scope.$parent.state.setOverviewState('fim');
|
2016-11-09 19:10:48 +00:00
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2016-09-16 12:35:56 +00:00
|
|
|
|
2016-09-22 12:02:46 +00:00
|
|
|
});
|
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewPMController', function ($scope, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-16 18:27:53 +00:00
|
|
|
|
2016-09-22 12:02:46 +00:00
|
|
|
$scope.load = true;
|
|
|
|
$scope.$parent.state.setOverviewState('pm');
|
2016-11-09 19:10:48 +00:00
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2016-09-22 12:02:46 +00:00
|
|
|
|
2017-01-13 20:34:35 +00:00
|
|
|
});
|
2016-09-16 12:35:56 +00:00
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewOSCAPController', function ($scope, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-16 18:27:53 +00:00
|
|
|
|
2017-01-13 20:34:35 +00:00
|
|
|
$scope.load = true;
|
|
|
|
$scope.$parent.state.setOverviewState('oscap');
|
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2016-09-16 12:35:56 +00:00
|
|
|
|
|
|
|
});
|
2017-01-23 13:14:59 +00:00
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewAuditController', function ($scope, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-23 13:14:59 +00:00
|
|
|
|
|
|
|
$scope.load = true;
|
|
|
|
$scope.$parent.state.setOverviewState('audit');
|
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2017-01-30 12:03:17 +00:00
|
|
|
});
|
|
|
|
|
2017-02-01 21:06:05 +00:00
|
|
|
app.controller('overviewPCIController', function ($scope, $compile, DataFactory, genericReq, $mdToast, errlog, $route) {
|
2017-01-30 12:03:17 +00:00
|
|
|
|
|
|
|
$scope.load = true;
|
|
|
|
$scope.$parent.state.setOverviewState('pci');
|
|
|
|
$scope.defaultManager = $scope.$parent.state.getDefaultManager().name;
|
2017-02-01 21:06:05 +00:00
|
|
|
|
2017-01-30 18:38:33 +00:00
|
|
|
var tabs = [];
|
|
|
|
genericReq.request('GET', '/api/wazuh-api/pci/all').then(function (data) {
|
|
|
|
angular.forEach(data, function(value, key) {
|
|
|
|
tabs.push({"title": key, "content": value});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$scope.tabs = tabs;
|
|
|
|
$scope.selectedIndex = 0;
|
|
|
|
|
|
|
|
$scope.addTab = function (title, view) {
|
|
|
|
view = view || title + " Content View";
|
|
|
|
tabs.push({ title: title, content: view, disabled: false});
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.removeTab = function (tab) {
|
|
|
|
var index = tabs.indexOf(tab);
|
|
|
|
tabs.splice(index, 1);
|
|
|
|
};
|
2017-01-30 12:03:17 +00:00
|
|
|
|
2017-01-23 13:14:59 +00:00
|
|
|
});
|