chg: [events:index] Quick search in event index only searches on event.info

The quickfilter used to search in all possible fields in the event and it was massively used by users who only wanted to search in the event.info field.
The search_all feature has been moved in the search index modal under the name `search in all fields` and the quick search input now only perform searches on the event.info field.
pull/8271/head
Sami Mokaddem 2022-04-06 10:07:10 +02:00
parent 960082e5f3
commit 903b461272
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 12 additions and 3 deletions

View File

@ -1109,6 +1109,7 @@ class EventsController extends AppController
'eventid' => array('OR' => array(), 'NOT' => array()),
'date' => array('from' => "", 'until' => ""),
'eventinfo' => array('OR' => array(), 'NOT' => array()),
'all' => array('OR' => array(), 'NOT' => array()),
'threatlevel' => array('OR' => array(), 'NOT' => array()),
'distribution' => array('OR' => array(), 'NOT' => array()),
'sharinggroup' => array('OR' => array(), 'NOT' => array()),
@ -1187,6 +1188,7 @@ class EventsController extends AppController
'hasproposal' => __('Has proposal'),
'timestamp' => __('Last change at'),
'publishtimestamp' => __('Published at'),
'all' => __('Search in all fields'),
];
if ($this->_isSiteAdmin()) {

View File

@ -153,6 +153,12 @@
'style' => 'display:none;width:424px;',
'div' => false
));
echo $this->Form->input('searchall', array(
'label' => false,
'class' => 'input-large',
'style' => 'display:none;width:424px;',
'div' => false
));
?>
<span id="addRuleButton" class="btn btn-inverse" style="margin-bottom:10px;display:none;"><?php echo __('Add');?></span>
</div>
@ -167,7 +173,7 @@
<th style="width:10px;border:1px solid #cccccc;border-left:0px;text-align: left;"></th>
</tr>
<?php
$fields = array('published', 'org', 'tag', 'date', 'eventinfo', 'eventid', 'threatlevel', 'analysis', 'distribution', 'sharinggroup', 'attribute', 'hasproposal', 'timestamp', 'publishtimestamp');
$fields = array('published', 'org', 'tag', 'date', 'eventinfo', 'eventid', 'threatlevel', 'analysis', 'distribution', 'sharinggroup', 'attribute', 'hasproposal', 'timestamp', 'publishtimestamp', 'all');
if ($isSiteAdmin) $fields[] = 'email';
foreach ($fields as $k => $field):
?>
@ -242,9 +248,9 @@ var filtering = <?php echo $filtering; ?>;
var operators = ["<?php echo __('OR');?>", "<?php echo __('NOT');?>"];
var allFields = ["published", "tag", "date", "eventinfo", "eventid", "threatlevel", "distribution", "sharinggroup", "analysis", "attribute", "hasproposal", "timestamp", "publishtimestamp"];
var allFields = ["published", "tag", "date", "eventinfo", "eventid", "threatlevel", "distribution", "sharinggroup", "analysis", "attribute", "hasproposal", "timestamp", "publishtimestamp", "all"];
var simpleFilters = ["tag", "eventinfo", "eventid", "threatlevel", "distribution", "sharinggroup", "analysis", "attribute"];
var simpleFilters = ["tag", "eventinfo", "eventid", "threatlevel", "distribution", "sharinggroup", "analysis", "attribute", "all"];
var differentFilters = ["published", "date", "hasproposal", "timestamp", "publishtimestamp"];

View File

@ -135,6 +135,7 @@
'button' => __('Filter'),
'placeholder' => __('Enter value to search'),
'data' => '',
'searchKey' => 'searcheventinfo',
)
)
);