Some minor changes to the event index

- Tags are now fully shown on the event index
- can be enabled via bootstrap (the Configure::write setting is in the bootstrap.default.php file)
- shorthand distribution names
- narrowed some of the fields down
pull/304/merge
iglocska 2014-08-28 16:29:30 +02:00
parent 83369da25a
commit 6206cdc619
3 changed files with 13 additions and 8 deletions

View File

@ -141,6 +141,7 @@ Configure::write('MISP.default_attribute_distribution', 'event');
// Enable the tagging feature, it shou
Configure::write('MISP.tagging', true);
Configure::write('MISP.full_tags_on_event_index', false);
// enabling this flag will allow the event description to be transmitted in the alert e-mail's subject. Be aware that this is not encrypted by PGP, so only enable it if you accept that part of the event description will be sent out in clear-text
Configure::write('MISP.extended_alert_subject', false);

View File

@ -235,6 +235,8 @@ class EventsController extends AppController {
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
$this->set('analysisLevels', $this->Event->analysisLevels);
$this->set('distributionLevels', $this->Event->distributionLevels);
$shortDist = array(0 => 'Organisation', 1 => 'Community', 2 => 'Connected', 3 => 'All');
$this->set('shortDist', $shortDist);
}
public function filterEventIndex() {
@ -316,7 +318,6 @@ class EventsController extends AppController {
} else {
$this->set('showorg', false);
}
$rules = $this->_arrayToValuesIndexArray($rules);
$this->set('tags', $tagNames);
$this->set('tagJSON', json_encode($tagJSON));

View File

@ -112,17 +112,20 @@
 
</td>
<?php endif; ?>
<td class="short">
<td style="width:30px;">
<a href="/events/view/<?php echo $event['Event']['id'] ?>"><?php echo $event['Event']['id'];?></a>
</td>
<?php if (Configure::read('MISP.tagging')): ?>
<td class="short">
<?php foreach ($event['EventTag'] as $tag):?>
<span class=tag style="background-color:<?php echo $tag['Tag']['colour']?>" title="<?php echo $tag['Tag']['name']; ?>">&nbsp;</span>
<td style = "max-width: 200px;">
<?php foreach ($event['EventTag'] as $tag):
$tagText = "&nbsp;";
if (Configure::read('MISP.full_tags_on_event_index')) $tagText = $tag['Tag']['name'];
?>
<span class=tag style="background-color:<?php echo $tag['Tag']['colour']?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>;" title="<?php echo $tag['Tag']['name']; ?>"><?php echo $tagText; ?></span>
<?php endforeach; ?>
</td>
<?php endif; ?>
<td class="short" onclick="location.href ='/events/view/<?php echo $event['Event']['id'];?>'">
<td style="width:30px;" onclick="location.href ='/events/view/<?php echo $event['Event']['id'];?>'">
<?php echo $event['Event']['attribute_count']; ?>&nbsp;
</td>
<?php if ('true' == $isSiteAdmin): ?>
@ -146,8 +149,8 @@
<?php echo nl2br(h($event['Event']['info'])); ?>&nbsp;
</td>
<?php if ('true' == Configure::read('MISP.sync')): ?>
<td class="short <?php if ($event['Event']['distribution'] == 0) echo 'privateRedText';?>" onclick="location.href ='/events/view/<?php echo $event['Event']['id'];?>'">
<?php echo $event['Event']['distribution'] != 3 ? $distributionLevels[$event['Event']['distribution']] : 'All';?>
<td class="short <?php if ($event['Event']['distribution'] == 0) echo 'privateRedText';?>" onclick="location.href ='/events/view/<?php echo $event['Event']['id'];?>'" title = "<?php echo $event['Event']['distribution'] != 3 ? $distributionLevels[$event['Event']['distribution']] : 'All';?>">
<?php echo $shortDist[$event['Event']['distribution']]; ?>
</td>
<?php endif; ?>
<td class="short action-links">