mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
FIM tab (wip) and minor changes
This commit is contained in:
parent
1b86769aab
commit
1fe1bc5f9f
@ -182,8 +182,8 @@ app.controller('agentsController', function ($scope, $route, alertify, sharedPro
|
||||
};
|
||||
|
||||
$scope.loadRootcheck = function (agentId) {
|
||||
sharedProperties.setProperty(agentId);
|
||||
$location.path('/rootcheck');
|
||||
sharedProperties.setProperty('rc//'+agentId);
|
||||
$location.path('/compliance');
|
||||
};
|
||||
|
||||
$scope.loadFIM = function (agentId) {
|
||||
|
@ -45,17 +45,17 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
_template += '<li><b>User ID:</b> '+event.uid+'</li>';
|
||||
_template += '<li><b>Group ID:</b> '+event.gid+'</li>';
|
||||
_template += '</ul></div>'
|
||||
alertify.okBtn("Close").alert(_template);
|
||||
alertify.alert(_template);
|
||||
};
|
||||
|
||||
$scope.loadDiscover = function (file) {
|
||||
var _filter = 'AlertsFile:"'+file+'"';
|
||||
var _filter = 'SyscheckFile.path:"'+file+'"';
|
||||
sharedProperties.setProperty('aa//'+_filter);
|
||||
$location.path('/discover');
|
||||
};
|
||||
|
||||
$scope.loadDashboard = function (file) {
|
||||
var _filter = 'AlertsFile:"' + file+'"';
|
||||
var _filter = 'SyscheckFile.path:"' + file+'"';
|
||||
sharedProperties.setProperty('ad//' + _filter);
|
||||
$location.path('/fim/dashboard');
|
||||
};
|
||||
@ -152,9 +152,9 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
};
|
||||
|
||||
$scope.setAgentFilter = function (id) {
|
||||
if (id != $scope.agentId) {
|
||||
$scope.eventFilter = '';
|
||||
$scope.typeFilter = '';
|
||||
if (id != $scope.agentId) {
|
||||
$scope.agentId = id;
|
||||
DataFactory.initialize('get', '/syscheck/' + id + '/files', {}, 16, 0)
|
||||
.then(function (data) {
|
||||
|
@ -19,6 +19,77 @@ app.controller('rcController', function ($scope, alertify, sharedProperties, Dat
|
||||
|
||||
//Functions
|
||||
|
||||
$scope.loadDiscover = function (event) {
|
||||
var _filter = 'full_log:"' + event + '"';
|
||||
sharedProperties.setProperty('aa//' + _filter);
|
||||
$location.path('/discover');
|
||||
};
|
||||
|
||||
$scope.loadDashboard = function (event) {
|
||||
var _filter = 'full_log:"' + event + '"';
|
||||
sharedProperties.setProperty('ad//' + _filter);
|
||||
$location.path('/compliance/dashboard');
|
||||
};
|
||||
|
||||
$scope.getEvents = function (body) {
|
||||
if (!body) {
|
||||
var tmpBody = DataFactory.getBody(objectsArray['/rootcheck']);
|
||||
if ($scope.search !== tmpBody['search']) {
|
||||
tmpBody['search'] = $scope.search;
|
||||
body = tmpBody;
|
||||
}
|
||||
} else if ($scope.search !== body['search']) {
|
||||
body['search'] = $scope.search;
|
||||
}
|
||||
if (body['search'] === '') {
|
||||
body['search'] = undefined;
|
||||
}
|
||||
|
||||
if (!body) {
|
||||
DataFactory.get(objectsArray['/rootcheck'])
|
||||
.then(function (data) {
|
||||
$scope.events.length = 0;
|
||||
$scope.events = data.data.items;
|
||||
}, printError);
|
||||
} else {
|
||||
DataFactory.get(objectsArray['/rootcheck'], body)
|
||||
.then(function (data) {
|
||||
$scope.events.length = 0;
|
||||
$scope.events = data.data.items;
|
||||
}, printError);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.hasPrevEvents = function () {
|
||||
return DataFactory.hasPrev(objectsArray['/rootcheck']);
|
||||
};
|
||||
$scope.prevEvents = function () {
|
||||
DataFactory.prev(objectsArray['/rootcheck'])
|
||||
.then(function (data) {
|
||||
$scope.events.length = 0;
|
||||
$scope.events = data.data.items;
|
||||
}, printError);
|
||||
};
|
||||
|
||||
$scope.hasNextEvents = function () {
|
||||
return DataFactory.hasNext(objectsArray['/rootcheck']);
|
||||
};
|
||||
$scope.nextEvents = function () {
|
||||
DataFactory.next(objectsArray['/rootcheck'])
|
||||
.then(function (data) {
|
||||
$scope.events.length = 0;
|
||||
$scope.events = data.data.items;
|
||||
}, printError);
|
||||
};
|
||||
|
||||
$scope.getStatusClass = function (status) {
|
||||
if (status === 'resolved') {
|
||||
return "statusGreen";
|
||||
} else {
|
||||
return "statusRed";
|
||||
}
|
||||
};
|
||||
|
||||
$scope.searchAgent = function () {
|
||||
if ($scope.searchAgents === '') {
|
||||
$scope.searchAgents = undefined;
|
||||
@ -78,6 +149,22 @@ app.controller('rcController', function ($scope, alertify, sharedProperties, Dat
|
||||
});
|
||||
};
|
||||
|
||||
$scope.isSetAgentFilter = function (id) {
|
||||
return ($scope.agentId === id);
|
||||
};
|
||||
|
||||
$scope.setAgentFilter = function (id) {
|
||||
if (id != $scope.agentId) {
|
||||
$scope.statusFilter = '';
|
||||
$scope.agentId = id;
|
||||
DataFactory.initialize('get', '/rootcheck/' + id, {}, 16, 0)
|
||||
.then(function (data) {
|
||||
objectsArray['/rootcheck'] = data;
|
||||
$scope.getEvents();
|
||||
}, printError);
|
||||
}
|
||||
};
|
||||
|
||||
var load = function () {
|
||||
var _agent = '000';
|
||||
var _init = sharedProperties.getProperty();
|
||||
@ -86,6 +173,7 @@ app.controller('rcController', function ($scope, alertify, sharedProperties, Dat
|
||||
sharedProperties.setProperty('');
|
||||
$scope.agentId = _agent;
|
||||
}
|
||||
$scope.agentId = _agent;
|
||||
|
||||
DataFactory.initialize('get', '/rootcheck/'+_agent, {}, 16, 0)
|
||||
.then(function (data) {
|
||||
|
@ -1286,6 +1286,14 @@ ul.eventTabs-controlButtons {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
}
|
||||
.upperDate {
|
||||
float: left;
|
||||
clear: left;
|
||||
}
|
||||
.bottomDate {
|
||||
float: left;
|
||||
clear: left;
|
||||
}
|
||||
ul.eventTabs-controlButtons li {
|
||||
display: inline;
|
||||
margin-left: 0;
|
||||
@ -1329,6 +1337,12 @@ ul.eventTabs-controlButtons li a {
|
||||
width: 200px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.event_card .dates{
|
||||
padding: 10px;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.eventRed {
|
||||
color: red;
|
||||
}
|
||||
@ -1338,7 +1352,12 @@ ul.eventTabs-controlButtons li a {
|
||||
.eventOrange {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.statusGreen {
|
||||
background-color: green;
|
||||
}
|
||||
.statusRed {
|
||||
background-color: red;
|
||||
}
|
||||
/* Wazuh submenu */
|
||||
.wazuh-submenu {
|
||||
background: #222;
|
||||
@ -1399,3 +1418,13 @@ ul.eventTabs-controlButtons li a {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.filterSpan {
|
||||
float: right;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
width: 40%;
|
||||
overflow: hidden;
|
||||
height: 32px;
|
||||
text-align: right;
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container" ng-controller="kibanaIntegrationController">
|
||||
<h2 class="container_page_title">Agents metrics <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defMetricsFilter != ''">{{defMetricsFilter}}</span></h2>
|
||||
<h2 class="container_page_title">Agents metrics <span class="filterSpan" ng-show="defMetricsFilter != ''">{{defMetricsFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px;">
|
||||
<label style="font-weight: bold;">Top 10 groups <a ng-href="{{getVisualization('TopGroups', defMetricsFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a></label>
|
||||
<iframe ng-src="{{getVisualization('TopGroups', defMetricsFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="350" width="100%"></iframe>
|
||||
|
@ -7,7 +7,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-controller="kibanaIntegrationController" style="height:100vh;">
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">CIS Dashboard <a ng-href="{{getDashboard('CISCompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">CIS Dashboard <a ng-href="{{getDashboard('CISCompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span class="filterSpan" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px; height: 100%;">
|
||||
<iframe ng-src="{{getDashboard('CISCompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-controller="kibanaIntegrationController" style="height:100vh;">
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">PCI Dashboard <a ng-href="{{getDashboard('PCICompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">PCI Dashboard <a ng-href="{{getDashboard('PCICompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span class="filterSpan" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px; height: 100%;">
|
||||
<iframe ng-src="{{getDashboard('PCICompliance', defDashboardFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-controller="kibanaIntegrationController" style="height:100vh;">
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">Rootcheck Dashboard <a ng-href="{{getDashboard('Rootcheck', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">Rootcheck Dashboard <a ng-href="{{getDashboard('Rootcheck', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span class="filterSpan" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px; height: 100%;">
|
||||
<iframe ng-src="{{getDashboard('Rootcheck', defDashboardFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
|
@ -25,27 +25,24 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 10px; width: 20%; height: 35px; border-radius: 4px; background-color: rgb(249, 249, 249); border: 1px solid rgb(204, 204, 204); float: left; text-align: left;">
|
||||
<div ng-class="{ event_filter_status_active: $parent.statusFilter == 'outstanding' }" ng-click="setStatusFilter('outstanding')" style="font-weight: bold;border-right: 1px solid #ccc; border-radius: 0px;"
|
||||
<div style="margin-left: 10px; width: 25%; height: 35px; border-radius: 4px; background-color: rgb(249, 249, 249); border: 1px solid rgb(204, 204, 204); float: left; text-align: left;">
|
||||
<div ng-class="{ event_filter_status_active: $parent.statusFilter == 'outstanding' }" ng-click="setStatusFilter('outstanding')" style="font-weight: bold;border-right: 1px solid #ccc; border-radius: 0px; width: 60%;"
|
||||
class="eventFilter">Outstanding </div>
|
||||
<div ng-class="{ event_filter_status_active: $parent.statusFilter == 'solved' }" ng-click="setTypeFilter('solved')" style="font-weight: bold; border-right: 1px solid rgb(204, 204, 204); border-radius: 0px; width: 100.5px;"
|
||||
class="eventFilter">Solved</div>
|
||||
<div ng-class="{ event_filter_status_active: $parent.statusFilter == 'solved' }" ng-click="setTypeFilter('solved')" style="font-weight: bold; border-right: 1px solid rgb(204, 204, 204); border-radius: 0px; width: 40%;"
|
||||
class="eventFilter">Resolved</div>
|
||||
</div>
|
||||
<div class="rcContentTabs">
|
||||
<div id="eventsTab">
|
||||
<div class="events_card_list" ng-repeat="event in events">
|
||||
<div class="event_card" ng-class="{ event_card_active: showDetails }" ng-click="showDetails = ! showDetails;">
|
||||
<div class="float_left">
|
||||
<div class="text" style="width: 460px; height: 45px; overflow: hidden; white-space: nowrap;">{{event.event}}</div>
|
||||
</div>
|
||||
<div class="float_left">
|
||||
<div class="fimEvent">First scan: {{event.oldDay}}</div>
|
||||
<div class="float_left" style="width: 70%;">
|
||||
<div class="text" style="height: 45px; overflow: hidden; white-space: nowrap;">{{event.event}}</div>
|
||||
</div>
|
||||
<div class="float_right">
|
||||
<div ng-class='getStatusClass(event.status);' class="status" ng-style="{ 'border-bottom-right-radius' : (showDetails) ? '0px' : '4px' }"></div>
|
||||
</div>
|
||||
<div class="float_right">
|
||||
<div class="fimDate">Last scan: {{event.readDay}}</div>
|
||||
<div class="float_right" style="border-left: 1px solid #ccc;">
|
||||
<div class="dates"><span class="upperDate">First scan: {{event.oldDay}}</span><span class="bottomDate" style="padding-left: 2px;">Last scan: {{event.readDay}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="" class="event_card_detail" ng-show="showDetails">
|
||||
@ -55,7 +52,7 @@
|
||||
<table class="table-event-information">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="table-event-information-td-value ng-binding">{{event.event}}</td>
|
||||
<td class="table-event-information-td-value ng-binding"><b>Full log: </b>{{event.event}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div ng-controller="kibanaIntegrationController" style="height:100vh;">
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">OSSEC dashboard <a ng-href="{{getDashboard('OSSECAlerts', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">OSSEC dashboard <a ng-href="{{getDashboard('OSSECAlerts', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span class="filterSpan" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px; height: 100%;">
|
||||
<iframe ng-src="{{getDashboard('OSSECAlerts', defDashboardFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-controller="kibanaIntegrationController" style="height:100vh;">
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">FIM Dashboard <a ng-href="{{getDashboard('fim', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span style="float: right; font-size: 16px; font-weight: bold;" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<h2 class="container_page_title" style="margin-left: 90px; margin-top: 30px; margin-right: 90px;">FIM Dashboard <a ng-href="{{getDashboard('fim', defDashboardFilter, 'from:now-7d,mode:quick,to:now', true)}}" target="_blank"><span class="glyphicon glyphicon-share"></span></a> <span class="filterSpan" ng-show="defDashboardFilter != ''">{{defDashboardFilter}}</span></h2>
|
||||
<div style="margin-bottom: 25px; height: 100%;">
|
||||
<iframe ng-src="{{getDashboard('fim', defDashboardFilter, 'from:now-7d,mode:quick,to:now', false)}}" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user