mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-08 02:38:51 +00:00
20 lines
662 B
JavaScript
20 lines
662 B
JavaScript
let app = require('ui/modules').get('app/wazuh', []);
|
|
|
|
// Logs controller
|
|
app.controller('managerLogController', function ($scope, Logs, apiReq,Notifier) {
|
|
const notify = new Notifier({ location: 'Manager - Logs' });
|
|
$scope.searchTerm = '';
|
|
$scope.loading = true;
|
|
$scope.logs = Logs;
|
|
|
|
$scope.logs.nextPage('')
|
|
.then(() => apiReq.request('GET', '/manager/logs/summary', {}))
|
|
.then(data => {
|
|
$scope.summary = data.data.data;
|
|
$scope.loading = false;
|
|
})
|
|
.catch(error => notify.error(error.message));
|
|
|
|
// Resetting the factory configuration
|
|
$scope.$on("$destroy", () => $scope.logs.reset());
|
|
}); |