Added gdpr filter

This commit is contained in:
Jesús Ángel González 2018-05-15 17:42:35 +02:00
parent cdfb1e4a0e
commit 7e58b9a052
3 changed files with 16 additions and 0 deletions

View File

@ -115,6 +115,8 @@ app.controller('agentsController', function ($timeout, $scope, $location, $rootS
if(tab !== 'general'){
if(tab === 'pci') {
filters.push(filterHandler.pciQuery())
} else if(tab === 'gdpr') {
filters.push(filterHandler.gdprQuery())
} else {
filters.push(filterHandler.ruleGroupQuery(tabFilters[tab].group));
}

View File

@ -100,4 +100,16 @@ export default class FilterHandler {
delete result.query;
return result;
}
gdprQuery(){
const result = this.base();
result.meta.type = 'exists';
result.meta.value = 'exists';
result.meta.key = 'rule.gdpr';
result.exists = {
field: 'rule.gdpr'
}
delete result.query;
return result;
}
}

View File

@ -141,6 +141,8 @@ app.controller('overviewController', function ($timeout, $scope, $location, $roo
if(tab !== 'general'){
if(tab === 'pci') {
filters.push(filterHandler.pciQuery())
} else if(tab === 'gdpr') {
filters.push(filterHandler.gdprQuery())
} else {
filters.push(filterHandler.ruleGroupQuery(tabFilters[tab].group));
}