FIM tab: new design (backend not working)

This commit is contained in:
jesmg 2016-07-22 15:41:09 +00:00
parent db7a2a126f
commit 2f26277f76
3 changed files with 374 additions and 169 deletions

View File

@ -1,7 +1,7 @@
// Require config
var app = require('ui/modules').get('app/wazuh', []);
app.controller('fimController', function ($scope, alertify, sharedProperties, DataFactory, $location) {
app.controller('fimController', function ($scope, alertify, sharedProperties, DataFactory, $location, $mdDialog) {
//Initialisation
$scope.load = true;
var objectsArray = [];
@ -10,8 +10,8 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
$scope.files = [];
$scope.agents = [];
$scope.search = '';
$scope.agentId = '000';
$scope.menuNavItem = 'fim';
$scope.submenuNavItem = 'overview';
//Print Error
var printError = function (error) {
@ -19,15 +19,87 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}
//Functions
$scope.agentsObj = {
//Obj with methods for virtual scrolling
getItemAtIndex: function (index) {
if ($scope._agents_blocked) {
return null;
}
var _pos = index - DataFactory.getOffset(objectsArray['/agents']);
if ((_pos > 15) || (_pos < 0)) {
$scope._agents_blocked = true;
DataFactory.scrollTo(objectsArray['/agents'], index)
.then(function (data) {
$scope.agents.length = 0;
$scope.agents = data.data.items;
$scope._agents_blocked = false;
}, printError);
} else {
return $scope.agents[_pos];
}
},
getLength: function () {
return DataFactory.getTotalItems(objectsArray['/agents']);
},
};
$scope.filesObj = {
//Obj with methods for virtual scrolling
getItemAtIndex: function (index) {
if ($scope._files_blocked) {
return null;
}
var _pos = index - DataFactory.getOffset(objectsArray['/syscheck/files']);
if ((_pos > 15) || (_pos < 0)) {
$scope._files_blocked = true;
DataFactory.scrollTo(objectsArray['/syscheck/files'], index)
.then(function (data) {
$scope.files.length = 0;
$scope.files = data.data.items;
$scope._files_blocked = false;
}, printError);
} else {
return $scope.files[_pos];
}
},
getLength: function () {
return DataFactory.getTotalItems(objectsArray['/syscheck/files']);
},
};
$scope.eventsObj = {
//Obj with methods for virtual scrolling
getItemAtIndex: function (index) {
if ($scope._events_blocked) {
return null;
}
var _pos = index - DataFactory.getOffset(objectsArray[$scope._agent.id + $scope._file.file]);
if ((_pos > 15) || (_pos < 0)) {
$scope._events_blocked = true;
DataFactory.scrollTo(objectsArray[$scope._agent.id + $scope._file.file], index)
.then(function (data) {
$scope.eventsFetchInfo.length = 0;
$scope.eventsFetchInfo = data.data.items;
$scope._events_blocked = false;
}, printError);
} else {
return $scope.eventsFetchInfo[_pos];
}
},
getLength: function () {
return DataFactory.getTotalItems(objectsArray[$scope._agent.id + $scope._file.file]);
},
};
$scope.getColorClass = function (event) {
switch (event) {
case 'added':
case 'readded':
return 'eventGreen';
return 'status green';
case 'modified':
return 'eventOrange';
return 'status orange';
case 'deleted':
return 'eventRed';
return 'status red';
default:
return '';
}
@ -72,7 +144,8 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
};
$scope.initEvents = function (agent, file) {
var body = { 'file' : file };
$scope._file = file;
var body = { 'file' : file.file };
var tmpBody = DataFactory.getBody(objectsArray['/syscheck/files']);
if (tmpBody && (tmpBody != { 'summary ': 'yes'})) {
angular.forEach(tmpBody, function (value, key) {
@ -80,25 +153,33 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
body[key] = value;
});
}
DataFactory.initialize('get', '/syscheck/'+agent+'/files', body, 10, 0)
DataFactory.initialize('get', '/syscheck/'+agent.id+'/files', body, 10, 0)
.then(function (data) {
objectsArray[agent+file] = data;
DataFactory.get(objectsArray[agent+file])
objectsArray[agent.id+file.file] = data;
DataFactory.get(objectsArray[agent.id+file.file])
.then(function (data) {
$scope.eventsFetchInfo[agent + file].length = 0;
$scope.eventsFetchInfo[agent + file] = data.data.items;
$scope.eventsFetchInfo.length = 0;
$scope.eventsFetchInfo = data.data.items;
}, printError)
}, printError);
};
$scope.getEvents = function (agent, file) {
if ($scope._events_blocked) {
return null;
}
$scope._events_blocked = true;
DataFactory.get(objectsArray[agent + file])
.then(function (data) {
$scope.eventsFetchInfo[agent + file].length = 0;
$scope.eventsFetchInfo[agent + file] = data.data.items;
$scope._events_blocked = false;
}, printError)
};
/*
* DEPRECATED
*/
$scope.hasNextEvents = function (agent, file) {
if (!objectsArray[agent + file])
return false;
@ -112,6 +193,9 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}, printError)
};
/*
* DEPRECATED
*/
$scope.hasPrevEvents = function (agent, file) {
if (!objectsArray[agent + file])
return false;
@ -125,30 +209,20 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}, printError)
};
$scope.setTypeFilter = function (filter) {
if ($scope.typeFilter != filter) {
$scope.typeFilter = filter;
} else {
$scope.typeFilter = '';
}
$scope.setTypeFilter = function () {
_setFilter();
};
$scope.setEventFilter = function (filter) {
if ($scope.eventFilter != filter) {
$scope.eventFilter = filter;
} else {
$scope.eventFilter = '';
}
_setFilter();
};
var _setFilter = function () {
var body = {};
if ($scope.eventFilter !== '') {
if (($scope.eventFilter !== '') && ($scope.eventFilter != 'all')) {
body['event'] = $scope.eventFilter;
}
if ($scope.typeFilter !== '') {
if (($scope.typeFilter !== '') && ($scope.typeFilter != 'all')) {
body['filetype'] = $scope.typeFilter;
}
if (body != {}) {
@ -158,16 +232,16 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}
};
$scope.isSetAgentFilter = function (id) {
/*DEPRECATED $scope.isSetAgentFilter = function (id) {
return ($scope.agentId === id);
};
};*/
$scope.setAgentFilter = function (id) {
if (id != $scope.agentId) {
$scope.setAgentFilter = function (agent) {
if (agent != $scope._agent) {
$scope._agent = agent;
$scope.eventFilter = '';
$scope.typeFilter = '';
$scope.agentId = id;
DataFactory.initialize('get', '/syscheck/' + id + '/files', {}, 16, 0)
DataFactory.initialize('get', '/syscheck/' + agent.id + '/files', {}, 15, 0)
.then(function (data) {
objectsArray['/syscheck/files'] = data;
$scope.getFiles();
@ -187,6 +261,10 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
};
$scope.getFiles = function (body) {
if ($scope._files_blocked) {
return null;
}
$scope._files_blocked = true;
if (!body) {
var tmpBody = DataFactory.getBody(objectsArray['/syscheck/files']);
if ($scope.search !== tmpBody['search']) {
@ -206,6 +284,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
$scope.files.length = 0;
$scope.eventsFetchInfo.length = 0;
$scope.files = data.data.items;
$scope._files_blocked = false;
}, printError);
} else {
body['summary'] = 'yes';
@ -214,10 +293,14 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
$scope.files.length = 0;
$scope.eventsFetchInfo.length = 0;
$scope.files = data.data.items;
$scope._files_blocked = false;
}, printError);
}
};
/*
* DEPRECATED
*/
$scope.hasNextFiles = function () {
return DataFactory.hasNext(objectsArray['/syscheck/files']);
};
@ -230,6 +313,9 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}, printError);
};
/*
* DEPRECATED
*/
$scope.hasPrevFiles = function () {
return DataFactory.hasPrev(objectsArray['/syscheck/files']);
};
@ -242,14 +328,70 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}, printError);
};
$scope.getAgents = function () {
DataFactory.get(objectsArray['/agents'])
.then(function (data) {
$scope.agents.length = 0;
$scope.agents = data.data.items;
}, printError);
$scope.agentStatusFilter = function () {
var _status;
if ($scope.statusFilter === 'all') {
_status = undefined;
} else {
_status = $scope.statusFilter;
}
$scope.getAgents({ 'sort': $scope.searchQuery, 'status': _status });
};
$scope.sort = function (keyname) {
$scope.sortKey = keyname;
$scope.reverse = !$scope.reverse;
$scope.searchQuery = '';
if (!$scope.reverse) {
$scope.searchQuery += '-';
}
$scope.searchQuery += $scope.sortKey;
if ($scope.statusFilter != '') {
$scope.getAgents({ 'sort': $scope.searchQuery, 'status': $scope.statusFilter });
} else {
$scope.getAgents({ 'sort': $scope.searchQuery });
}
};
$scope.getAgents = function (body) {
if ($scope._agents_blocked) {
return null;
}
$scope._agents_blocked = true;
//Search agent body modification
if (!body) {
var tmpBody = DataFactory.getBody(objectsArray['/agents']);
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['/agents'])
.then(function (data) {
$scope.agents.length = 0;
$scope.agents = data.data.items;
$scope._agents_blocked = false;
}, printError);
} else {
DataFactory.get(objectsArray['/agents'], body)
.then(function (data) {
$scope.agents.length = 0;
$scope.agents = data.data.items;
$scope._agents_blocked = false;
}, printError);
}
};
/*
* DEPRECATED
*/
$scope.hasNextAgents = function () {
return DataFactory.hasNext(objectsArray['/agents']);
};
@ -261,6 +403,9 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
}, printError);
};
/*
* DEPRECATED
*/
$scope.hasPrevAgents = function () {
return DataFactory.hasPrev(objectsArray['/agents']);
};
@ -290,6 +435,24 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
});
};
$scope.showFilesFiltersDialog = function (ev) {
$mdDialog.show({
contentElement: '#filtersFilesDialog',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose: true
});
};
$scope.showAgentsFiltersDialog = function (ev) {
$mdDialog.show({
contentElement: '#filtersAgentsDialog',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose: true
});
};
var load = function () {
var _agent = '000';
var _init = sharedProperties.getProperty();
@ -299,10 +462,10 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
$scope.agentId = _agent;
}
DataFactory.initialize('get', '/syscheck/'+_agent+'/files', {'summary': 'yes'}, 16, 0)
DataFactory.initialize('get', '/syscheck/'+_agent+'/files', {'summary': 'yes'}, 15, 0)
.then(function (data) {
objectsArray['/syscheck/files'] = data;
DataFactory.initialize('get', '/agents', {}, 10, 0)
DataFactory.initialize('get', '/agents', {}, 15, 0)
.then(function (data) {
objectsArray['/agents'] = data;
load_data();
@ -317,6 +480,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
DataFactory.get(objectsArray['/agents'])
.then(function (data) {
$scope.agents = data.data.items;
$scope._agent = data.data.items[0];
$scope.load = false;
});
}, printError);
@ -330,6 +494,7 @@ app.controller('fimController', function ($scope, alertify, sharedProperties, Da
angular.forEach(objectsArray, function (value) {
DataFactory.clean(value)
});
$scope.files.length = 0;
$scope.eventsFetchInfo.length = 0;
$scope.agents.length = 0;
});

View File

@ -12,6 +12,9 @@
.status.red{
background-color: red;
}
.status.orange {
background-color: orange;
}
.status.round{
border-radius: 50%;
height: 15px;

View File

@ -1,141 +1,178 @@
<div flex ng-controller="fimController" layout="column">
<!-- Cambiar backend alertas y popups -->
<!-- enerror el semaforo debe cambiar -->
<md-content class="md-padding">
<md-nav-bar md-selected-nav-item="menuNavItem" nav-bar-aria-label="navigation menu">
<md-nav-item md-nav-href="#/manager" name="manager">Manager</md-nav-item>
<md-nav-item md-nav-href="#/agents" name="agents">Agents</md-nav-item>
<md-nav-item md-nav-href="#/ruleset" name="ruleset">Ruleset</md-nav-item>
<md-nav-item md-nav-href="#/fim" name="fim">File integrity</md-nav-item>
<md-nav-item md-nav-href="#/compliance" name="compliance">Compliance</md-nav-item>
<md-nav-item md-nav-href="#/settings" name="settings">Settings</md-nav-item>
</md-nav-bar>
</md-content>
<md-content class="md-padding">
<md-nav-bar md-selected-nav-item="menuNavItem" nav-bar-aria-label="navigation menu">
<md-nav-item md-nav-href="#/manager" name="manager">Manager</md-nav-item>
<md-nav-item md-nav-href="#/agents" name="agents">Agents</md-nav-item>
<md-nav-item md-nav-href="#/ruleset" name="ruleset">Ruleset</md-nav-item>
<md-nav-item md-nav-href="#/fim" name="fim">File integrity</md-nav-item>
<md-nav-item md-nav-href="#/compliance" name="compliance">Compliance</md-nav-item>
<md-nav-item md-nav-href="#/settings" name="settings">Settings</md-nav-item>
</md-nav-bar>
</md-content>
<md-progress-linear md-mode="indeterminate" ng-show="load"></md-progress-linear>
<md-progress-linear md-mode="indeterminate" ng-show="load"></md-progress-linear>
<md-content class="md-padding">
<md-nav-bar md-selected-nav-item="submenuNavItem" nav-bar-aria-label="navigation submenu">
<md-nav-item md-nav-href="#/fim" name="overview">Overview</md-nav-item>
<md-nav-item md-nav-href="#/fim/dashboard" name="metrics">Dashboard</md-nav-item>
</md-nav-bar>
</md-content>
<md-content class="md-padding">
<md-nav-bar md-selected-nav-item="submenuNavItem" nav-bar-aria-label="navigation submenu">
<md-nav-item md-nav-href="#/fim" name="overview">Overview</md-nav-item>
<md-nav-item md-nav-href="#/fim/dashboard" name="metrics">Dashboard</md-nav-item>
</md-nav-bar>
</md-content>
<div flex layout="row" ng-if="!load">
<md-content flex id="content" layout="column" layout-padding>
<md-toolbar layout="row" class="md-primary _md" ng-if="_agent">
<div class="md-toolbar-tools">
<h3 class="ng-binding">{{_agent.id}} - {{_agent.name}}</h3>
</div>
</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>
<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">
<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>
<md-divider></md-divider>
</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">
<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>
<p layout="column"><span><b>MD5: </b>{{event.md5}}</span> <span><b>SHA1: </b>{{event.sha1}}</span></p>
<p>{{event.octalMode.slice(-4)}}</p>
<p layout="column"><span><b>U: </b>{{event.user}} </span><b>G: </b>{{event.group}}</span>
</p>
<p>{{event.modificationDate}}</p>
<span class="glyphicon glyphicon-plus" ng-click="printEventInfo(event)"></span>
<span class="glyphicon glyphicon-share" ng-click="loadDiscover(file.file);"></span> Discover
<span class="glyphicon glyphicon-share" ng-click="loadDashboard(file.file);"></span> Dashboard
</div>
</div>
</md-tab>
</md-tabs>
</md-content>
<div flex layout="row" ng-if="!load">
<md-content flex id="content" layout-padding>
<md-toolbar class="md-primary _md" ng-show="_agent">
<div class="md-toolbar-tools">
<h3 class="ng-binding">{{_agent.id}} - {{_agent.name}}</h3>
</div>
</md-toolbar>
<md-input-container class="sideNavBox">
<label for="searchBox">Search</label>
<input type="text" id="searchBox" ng-model="$parent.search" ng-change="agentsGet()" md-autofocus flex>
<md-icon md-font-icon="fa fa-cog" ng-click="showFiltersDialog()" />
</md-input-container>
<!-- scroll infinito aqui-->
</md-content>
<md-sidenav md-is-open="isOpenSidenav" md-component-id="agentsNav" md-is-locked-open="$mdMedia('gt-sm')" md-disable-backdrop
layout="column" class="md-sidenav-right md-whiteframe-z2">
<md-icon md-font-icon="fa fa-times" aria-label="close lateral menu" ng-click="isOpenSidenav = !isOpenSidenav" hide-gt-sm></md-icon>
<md-input-container class="sideNavBox">
<label for="searchBox">Search</label>
<input type="text" id="searchBox" ng-model="$parent.searchAgents" ng-change="searchAgent()" md-autofocus flex>
<md-icon md-font-icon="fa fa-cog" ng-click="showAgentsFiltersDialog($event)" />
</md-input-container>
<md-chips>
<md-chip ng-show="statusFilter">{{statusFilter}}</md-chip>
<md-chip ng-show="!statusFilter">all</md-chip>
<md-chip ng-show="sortKey">
{{sortKey}}
<span class="glyphicon sort-icon" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
</md-chip>
</md-chips>
<md-virtual-repeat-container class="vertical-repeater">
<div md-virtual-repeat="agent in agentsObj" md-on-demand flex>
<div layout="column" layout-align="space-around stretch">
<md-card ng-click="setAgentFilter(agent);">
<md-card-title>
<md-card-title-text>
<span class="md-title">{{agent.id}} <span ng-if="agent.id == '000'">(Manager)</span></span>
<span class="md-subhead">{{agent.name}} - {{agent.ip}}</span>
</md-card-title-text>
<div layout="column" class="status" ng-class="getAgentStatusClass(agent.status);">
</div>
</md-card-title>
</md-card>
</div>
</div>
</md-virtual-repeat-container>
</md-sidenav>
<md-button ng-show="!isOpenSidenav" class="md-icon-button md-primary" ng-click="isOpenSidenav = !isOpenSidenav" aria-label="Agents"
hide-gt-sm>
<span class="glyphicon glyphicon-menu-hamburger"></span>
</md-button>
</div>
<md-sidenav md-is-open="isOpenSidenav" md-component-id="agentsNav" md-is-locked-open="$mdMedia('gt-sm')" md-disable-backdrop
layout="column" class="md-sidenav-right md-whiteframe-z2">
<md-icon md-font-icon="fa fa-times" aria-label="close lateral menu" ng-click="isOpenSidenav = !isOpenSidenav" hide-gt-sm></md-icon>
<md-input-container class="sideNavBox">
<label for="searchBox">Search</label>
<input type="text" id="searchBox" ng-model="$parent.search" ng-change="agentsGet()" md-autofocus flex>
<md-icon md-font-icon="fa fa-cog" ng-click="showFiltersDialog()" />
</md-input-container>
<md-chips>
<md-chip ng-show="statusFilter">{{statusFilter}}</md-chip>
<md-chip ng-show="!statusFilter">all</md-chip>
<md-chip ng-show="sortKey">
{{sortKey}}
<span class="glyphicon sort-icon" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
</md-chip>
</md-chips>
<md-virtual-repeat-container class="vertical-repeater">
<div md-virtual-repeat="agent in agentsObj" md-on-demand flex>
<div layout="column" layout-align="space-around stretch">
<md-card ng-click="fetchAgent(agent)">
<md-card-title>
<md-card-title-text>
<span class="md-title">{{agent.id}} <span ng-if="agent.id == '000'">(Manager)</span></span>
<span class="md-subhead">{{agent.name}} - {{agent.ip}}</span>
</md-card-title-text>
<div layout="column" class="status" ng-class="getAgentStatusClass(agent.status);">
</div>
</md-card-title>
</md-card>
</div>
</div>
</md-virtual-repeat-container>
</md-sidenav>
<md-button ng-show="!isOpenSidenav" class="md-icon-button md-primary" ng-click="isOpenSidenav = !isOpenSidenav" aria-label="Agents"
hide-gt-sm>
<span class="glyphicon glyphicon-menu-hamburger"></span>
</md-button>
</div>
<div style="display: none">
<div class="md-dialog-container" id="filtersAgentsDialog">
<md-dialog layout-padding layout="column" layout-align="space-around center">
<label>Filter by status:</label>
<md-input-container>
<md-select ng-model="statusFilter" ng-change="agentStatusFilter()" aria-label="Filter by status">
<md-option value="all">All</md-option>
<md-option value="active">Active</md-option>
<md-option value="disconnected">Disconnected</md-option>
<md-option value="never connected">Never connected</md-option>
</md-select>
</md-input-container>
<label>Order by:</label>
<div flex layout="row" layout-align="space-around center" md-disable-backdrop class="md-padding">
<md-button class="md-primary" ng-click="sort('status')">
<span>Status</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='status'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='status'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('ip')">
<span>IP</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='ip'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='ip'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('name')">
<span>Name</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='name'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='name'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('id')">
<span>ID</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='id'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='id'"></span>
</md-button>
</div>
</md-dialog>
</div>
</div>
<div style="display: none">
<div class="md-dialog-container" id="filtersAgentsDialog">
<md-dialog layout-padding layout="column" layout-align="space-around center">
<label>Filter by status:</label>
<md-input-container>
<md-select ng-model="statusFilter" ng-change="agentStatusFilter()" aria-label="Filter by status">
<md-option value="all">All</md-option>
<md-option value="active">Active</md-option>
<md-option value="disconnected">Disconnected</md-option>
<md-option value="never connected">Never connected</md-option>
</md-select>
</md-input-container>
<label>Order by:</label>
<div flex layout="row" layout-align="space-around center" md-disable-backdrop class="md-padding">
<md-button class="md-primary" ng-click="sort('status')">
<span>Status</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='status'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='status'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('ip')">
<span>IP</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='ip'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='ip'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('name')">
<span>Name</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='name'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='name'"></span>
</md-button>
<md-button class="md-primary" ng-click="sort('id')">
<span>ID</span>
<span class="glyphicon sort-icon" ng-show="sortKey=='id'" ng-class="{'glyphicon-triangle-top':reverse,'glyphicon-triangle-bottom':!reverse}"></span>
<span class="glyphicon sort-icon glyphicon-minus" ng-show="sortKey!='id'"></span>
</md-button>
</div>
</md-dialog>
</div>
</div>
<div style="display: none">
<div class="md-dialog-container" id="filtersFilesDialog">
<md-dialog layout-padding layout="column" layout-align="space-around center">
<label>Filter by event:</label>
<md-input-container>
<md-select ng-model="eventFilter" ng-change="setEventFilter()" aria-label="Filter by event">
<md-option value="all">All</md-option>
<md-option value="added">Added</md-option>
<md-option value="modified">Modified</md-option>
<md-option value="readded">Re-added</md-option>
<div style="display: none">
<div class="md-dialog-container" id="filtersFilesDialog">
<md-dialog layout-padding layout="column" layout-align="space-around center">
<label>Filter by event:</label>
<md-input-container>
<md-select ng-model="eventFilter" ng-change="setEventFilter()" aria-label="Filter by event">
<md-option value="all">All</md-option>
<md-option value="added">Added</md-option>
<md-option value="modified">Modified</md-option>
<md-option value="readded">Re-added</md-option>
<md-option value="">Deleted</md-option>
</md-select>
</md-input-container>
</md-select>
</md-input-container>
<label>Filter by type:</label>
<md-input-container>
<md-select ng-model="typeFilter" ng-change="setTypeFilter()" aria-label="Filter by type">
<md-option value="all">All</md-option>
<md-option value="file">File</md-option>
<md-option value="registry">Registry</md-option>
</md-select>
</md-input-container>
</md-dialog>
</div>
</div>
<md-input-container>
<md-select ng-model="typeFilter" ng-change="setTypeFilter()" aria-label="Filter by type">
<md-option value="all">All</md-option>
<md-option value="file">File</md-option>
<md-option value="registry">Registry</md-option>
</md-select>
</md-input-container>
<label>Clean FIM database in all agents:</label>
<md-button class="md-raised md-primary" ng-click="cleandb()">Clean</md-button>
<label>Start scan in all agents:</label>
<md-button class="md-raised md-primary" ng-click="startfim()">Scan</md-button>
</md-dialog>
</div>
</div>
</div>