mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
FIM tab: Design fixed. Select agent and file working. File details not working
This commit is contained in:
parent
2f26277f76
commit
e177e5af76
@ -50,7 +50,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
return null;
|
||||
}
|
||||
var _pos = index - DataFactory.getOffset(objectsArray['/syscheck/files']);
|
||||
if ((_pos > 15) || (_pos < 0)) {
|
||||
if ((_pos > 30) || (_pos < 0)) {
|
||||
$scope._files_blocked = true;
|
||||
DataFactory.scrollTo(objectsArray['/syscheck/files'], index)
|
||||
.then(function (data) {
|
||||
@ -153,7 +153,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
body[key] = value;
|
||||
});
|
||||
}
|
||||
DataFactory.initialize('get', '/syscheck/'+agent.id+'/files', body, 10, 0)
|
||||
DataFactory.initialize('get', '/syscheck/'+agent.id+'/files', body, 35, 0)
|
||||
.then(function (data) {
|
||||
objectsArray[agent.id+file.file] = data;
|
||||
DataFactory.get(objectsArray[agent.id+file.file])
|
||||
@ -241,7 +241,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
$scope._agent = agent;
|
||||
$scope.eventFilter = '';
|
||||
$scope.typeFilter = '';
|
||||
DataFactory.initialize('get', '/syscheck/' + agent.id + '/files', {}, 15, 0)
|
||||
DataFactory.initialize('get', '/syscheck/' + agent.id + '/files', {}, 20, 0)
|
||||
.then(function (data) {
|
||||
objectsArray['/syscheck/files'] = data;
|
||||
$scope.getFiles();
|
||||
@ -462,7 +462,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
|
||||
$scope.agentId = _agent;
|
||||
}
|
||||
|
||||
DataFactory.initialize('get', '/syscheck/'+_agent+'/files', {'summary': 'yes'}, 15, 0)
|
||||
DataFactory.initialize('get', '/syscheck/'+_agent+'/files', {'summary': 'yes'}, 35, 0)
|
||||
.then(function (data) {
|
||||
objectsArray['/syscheck/files'] = data;
|
||||
DataFactory.initialize('get', '/agents', {}, 15, 0)
|
||||
|
@ -30,27 +30,24 @@
|
||||
</md-toolbar>
|
||||
<md-input-container layout="row" class="sideNavBox" ng-if="_agent">
|
||||
<label for="searchBox">Search</label>
|
||||
<input type="text" id="searchBox" ng-model="$parent.search" ng-change="agentsGet()" md-autofocus flex>
|
||||
<input type="text" id="searchBox" ng-model="$parent.$parent.search" ng-change="getFiles()" md-autofocus flex>
|
||||
<md-icon md-font-icon="fa fa-cog" ng-click="showFilesFiltersDialog($event)" />
|
||||
</md-input-container>
|
||||
<md-tabs md-dynamic-height md-border-bottom ng-if="_agent" flex>
|
||||
<md-tab label="Files overview" flex>
|
||||
<md-virtual-repeat-container class="vertical-repeater">
|
||||
<md-tab label="Last results" flex>
|
||||
<md-virtual-repeat-container class="vertical-repeater" style="min-height: 400px;">
|
||||
<div md-virtual-repeat="file in filesObj" md-on-demand flex>
|
||||
<div layout="row" layout-align="center center" ng-click="initEvents(_agent, file)">
|
||||
<p>{{file.file.length > 58 ? file.file.substring(0, 55)+'...' : file.file}}</p>
|
||||
<md-divider></md-divider>
|
||||
<p>{{file.event.charAt(0).toUpperCase() + file.event.slice(1)}}</p>
|
||||
<md-divider></md-divider>
|
||||
<p>{{file.modificationDate}}</p>
|
||||
<div layout="row" layout-align="space-between center" ng-click="initEvents(_agent, file)">
|
||||
<span>{{file.file.length > 58 ? file.file.substring(0, 55)+'...' : file.file}}</span>
|
||||
<md-divider></md-divider>
|
||||
<span class="right-text" style="float: right;">{{file.modificationDate}} ({{file.event.charAt(0).toUpperCase() + file.event.slice(1)}})</span>
|
||||
</div>
|
||||
<md-divider></md-divider>
|
||||
</div>
|
||||
</md-virtual-repeat-container>
|
||||
</md-tab>
|
||||
<md-tab label="File detail" flex ng-if="_file">
|
||||
<md-virtual-repeat-container class="vertical-repeater">
|
||||
<md-virtual-repeat-container class="vertical-repeater" style="min-height: 400px;">
|
||||
<div md-virtual-repeat="event in eventsObj" md-on-demand flex>
|
||||
<div layout="row" layout-align="center center">
|
||||
<p>{{event.event.charAt(0).toUpperCase() + event.event.slice(1)}}</p>
|
||||
|
@ -1,99 +0,0 @@
|
||||
<!-- En los filter añadir el "all" y quitar parametro entrada -->
|
||||
<!-- Cambiar backend alertas y popups -->
|
||||
<div class="fimContentTabs">
|
||||
<div id="eventsTab">
|
||||
<div class="events_card_list" ng-repeat="file in files" ng-init="eventsFetchInfo[agentId+file.file]=[];">
|
||||
<div class="event_card" ng-class="{ event_card_active: showDetails }" ng-click="showDetails = ! showDetails; showDetails ? initEvents(agentId, file.file) : null;">
|
||||
<div class="float_left">
|
||||
<div class="text" style="width: 460px; height: 45px; overflow: hidden; white-space: nowrap;">{{file.file.length > 58 ? file.file.substring(0, 55)+'...' : file.file}}</div>
|
||||
</div>
|
||||
<div class="float_right">
|
||||
<div class="fimEvent">{{file.event.charAt(0).toUpperCase() + file.event.slice(1)}}</div>
|
||||
</div>
|
||||
<div class="float_right">
|
||||
<div class="fimDate">{{file.modificationDate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="" class="event_card_detail" ng-show="showDetails">
|
||||
<div class="eventTabs-container">
|
||||
<div class="eventTabs-info">
|
||||
<div class="eventTabs-box">
|
||||
<table class="table-event-information">
|
||||
<tbody ng-repeat="event in eventsFetchInfo[agentId+file.file]">
|
||||
<tr>
|
||||
<td class="table-event-information-td-value ng-binding" style="width: 70px; overflow: hidden; padding-top: 10px;" ng-class="getColorClass(event.event);">{{event.event.charAt(0).toUpperCase() + event.event.slice(1)}}</td>
|
||||
<td class="table-event-information-td-value ng-binding" style="width: 330px; overflow: hidden; padding-top: 10px;">
|
||||
<span ng-click="searchHash(event.md5)" style="float: left; clear: left;"><b>MD5: </b>{{event.md5}}</span>
|
||||
<span ng-click="searchHash(event.sha1)" style="float: left; clear: left;"><b>SHA1: </b>{{event.sha1}}</span>
|
||||
</td>
|
||||
<td class="table-event-information-td-value ng-binding" style="width: 60px; padding-top: 10px;"><span tooltips tooltip-template="{{event.permissions}}">{{event.octalMode.slice(-4)}}</span></td>
|
||||
<td class="table-event-information-td-value ng-binding" style="width: 90px; padding-bottom: 0px;"><span tooltips tooltip-template="User Id: {{event.uid}}</br>Group Id: {{event.gid}}">
|
||||
<span style="float: left; clear: left;"><b>U: </b>{{event.user}}</span>
|
||||
<span style="float: left; clear: left;"><b>G: </b>{{event.group}}</span></span></td>
|
||||
<td class="table-event-information-td-value ng-binding" style="float: right; width: 90px; text-align: center; padding-top: 10px;" ng-click="printEventInfo(event)"><span class="glyphicon glyphicon-plus"></span></td>
|
||||
<td class="table-event-information-td-value ng-binding" style="float: right; width: 200px; text-align: center; padding-top: 10px;">{{event.modificationDate}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="glyphicon glyphicon-chevron-left" ng-click="prevEvents(agentId, file.file)" ng-show="hasPrevEvents(agentId, file.file)"></span>
|
||||
<span class="glyphicon glyphicon-chevron-right" ng-click="nextEvents(agentId, file.file)" ng-show="hasNextEvents(agentId, file.file)"></span>
|
||||
</div>
|
||||
<ul class="eventTabs-controlButtons">
|
||||
<li>
|
||||
<a ng-click="loadDiscover(file.file);">
|
||||
<span class="form-group-addon glyphicon glyphicon-share iconControl"></span> Discover
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="loadDashboard(file.file);">
|
||||
<span class="form-group-addon glyphicon glyphicon-share iconControl"></span> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="glyphicon glyphicon-chevron-left" ng-click="prevFiles()" ng-show="hasPrevFiles()"></span>
|
||||
<span class="glyphicon glyphicon-chevron-right" ng-click="nextFiles()" ng-show="hasNextFiles()"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightCol">
|
||||
<div class="block">
|
||||
<div class="titleCol">
|
||||
<h2>AGENTS:</h2>
|
||||
</div>
|
||||
<table class="table-files">
|
||||
<tr class="table-files-list-tr">
|
||||
<td class="table-files-list-td"><input type="text" ng-model="$parent.searchAgents" ng-change="searchAgent()" class="form-control ng-pristine ng-valid rulesetSearch ng-touched"
|
||||
placeholder="Search..."></td>
|
||||
</tr>
|
||||
<tr ng-class="" class="table-files-list-tr" ng-repeat="agent in agents">
|
||||
<td class="table-files-list-td"><span ng-click="setAgentFilter(agent.id)" ng-class="{ textFilterActive: isSetAgentFilter(agent.id) }" class="bold">{{agent.id}} - {{agent.name}}</span></td>
|
||||
</tr>
|
||||
<tr class="table-files-list-tr">
|
||||
<td class="table-files-list-td">
|
||||
<span class="glyphicon glyphicon-chevron-left" ng-click="prevAgents()" ng-show="hasPrevAgents()"></span>
|
||||
<span class="glyphicon glyphicon-chevron-right" ng-click="nextAgents()" ng-show="hasNextAgents()"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div class="titleCol">
|
||||
<h2>QUICK ACTIONS:</h2>
|
||||
</div>
|
||||
<form ng-submit="addAgent()">
|
||||
<label>This actions will be performed over all agents.</label>
|
||||
<button aria-label="Clean database" ng-click="cleandb()" class="btn btn-primary">
|
||||
Clean database
|
||||
</button>
|
||||
<button aria-label="Start scan" ng-click="startfim()" class="btn btn-primary">
|
||||
Start scan
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user