diff --git a/app/Controller/EventsController.php b/app/Controller/EventsController.php index 51450add0..cdca1bfe6 100644 --- a/app/Controller/EventsController.php +++ b/app/Controller/EventsController.php @@ -26,7 +26,7 @@ class EventsController extends AppController ); private $acceptedFilteringNamedParams = array('sort', 'direction', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'attributeFilter', 'extended', 'page', - 'searchFor', 'attributeFilter', 'proposal', 'correlation', 'warning', 'deleted', 'includeRelatedTags', 'distribution', 'taggedAttributes', 'galaxyAttachedAttributes', 'objectType', 'attributeType', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'feed', 'server', + 'searchFor', 'attributeFilter', 'proposal', 'correlation', 'warning', 'deleted', 'includeRelatedTags', 'distribution', 'taggedAttributes', 'galaxyAttachedAttributes', 'objectType', 'attributeType', 'focus', 'extended', 'overrideLimit', 'filterColumnsOverwrite', 'feed', 'server', 'toIDS' ); public $defaultFilteringRules = array( @@ -37,6 +37,7 @@ class EventsController extends AppController 'warning' => 0, 'deleted' => 2, 'includeRelatedTags' => 0, + 'toIDS' => 0, 'feed' => 0, 'server' => 0, 'distribution' => array(0, 1, 2, 3, 4, 5), @@ -1044,6 +1045,9 @@ class EventsController extends AppController if (isset($filters['deleted'])) { $conditions['deleted'] = $filters['deleted'] == 2 ? 0 : 1; } + if (isset($filters['toIDS']) && $filters['toIDS'] != 0) { + $conditions['to_ids'] = $filters['toIDS'] == 2 ? 0 : 1; + } $conditions['includeFeedCorrelations'] = true; if (!isset($filters['includeServerCorrelations'])) { $conditions['includeServerCorrelations'] = 1; @@ -1486,6 +1490,9 @@ class EventsController extends AppController if (isset($this->params['named']['deleted'])) { $conditions['deleted'] = $this->params['named']['deleted'] == 2 ? 0 : 1; } + if (isset($this->params['named']['toIDS']) && $this->params['named']['toIDS'] != 0) { + $conditions['to_ids'] = $this->params['named']['toIDS'] == 2 ? 0 : 1; + } if (isset($this->params['named']['includeRelatedTags']) && $this->params['named']['includeRelatedTags']) { $conditions['includeRelatedTags'] = 1; } diff --git a/app/Model/Event.php b/app/Model/Event.php index 4be912096..7301f8da0 100755 --- a/app/Model/Event.php +++ b/app/Model/Event.php @@ -4736,6 +4736,7 @@ class Event extends AppModel 'correlation' => isset($passedArgs['correlation']) ? $passedArgs['correlation'] : 0, 'warning' => isset($passedArgs['warning']) ? $passedArgs['warning'] : 0, 'deleted' => isset($passedArgs['deleted']) ? $passedArgs['deleted'] : 0, + 'toIDS' => isset($passedArgs['toIDS']) ? $passedArgs['toIDS'] : 0, 'feed' => isset($passedArgs['feed']) ? $passedArgs['feed'] : 0, 'server' => isset($passedArgs['server']) ? $passedArgs['server'] : 0 ); diff --git a/app/View/Elements/Events/View/eventFilteringQueryBuilder.ctp b/app/View/Elements/Events/View/eventFilteringQueryBuilder.ctp index 6f0e05a2f..f693fdbd6 100644 --- a/app/View/Elements/Events/View/eventFilteringQueryBuilder.ctp +++ b/app/View/Elements/Events/View/eventFilteringQueryBuilder.ctp @@ -119,6 +119,21 @@ function triggerEventFilteringTool(clicked) { 1: "Yes" } }, + { + "input": "radio", + "type": "integer", + "operators": [ + "equal", + ], + "unique": true, + "id": "toIDS", + "label": "IDS Flag", + "values": { + 0: "Both", + 1: "Set only", + 2: "Exclude Unset" + } + }, { "input": "radio", "type": "integer", @@ -269,6 +284,13 @@ function triggerEventFilteringTool(clicked) { value: }, + + { + field: 'toIDS', + id: 'toIDS', + value: + }, + { field: 'feed',