fix: [enrichment] Removed possibility to display freetext result in the new module results view

pull/4584/head
chrisr3d 2019-04-25 16:28:42 +02:00
parent b38b703dc7
commit 68019b63c9
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 5 additions and 9 deletions

View File

@ -5169,13 +5169,9 @@ class EventsController extends AppController
}
}
$this->set('event', $event);
if (!empty($result['results'])) {
$this->__handleSimplifiedFormat($attribute, $module, $options, $result, $type, $event = true, $render_name = 'resolved_misp_format');
} else {
$this->set('menuItem', 'enrichmentResults');
$this->set('title', 'Enrichment Results');
$this->render('resolved_misp_format');
}
$this->set('menuItem', 'enrichmentResults');
$this->set('title', 'Enrichment Results');
$this->render('resolved_misp_format');
}
}
@ -5215,7 +5211,7 @@ class EventsController extends AppController
$this->__handleSimplifiedFormat($attribute, $module, $options, $result, $type);
}
private function __handleSimplifiedFormat($attribute, $module, $options, $result, $type, $event = false, $renderName = 'resolved_attributes')
private function __handleSimplifiedFormat($attribute, $module, $options, $result, $type, $event = false)
{
$resultArray = $this->Event->handleModuleResult($result, $attribute[0]['Attribute']['event_id']);
if (!empty($result['comment'])) {
@ -5255,7 +5251,7 @@ class EventsController extends AppController
$this->set('typeCategoryMapping', $typeCategoryMapping);
$this->set('title', 'Enrichment Results');
$this->set('importComment', $importComment);
$this->render($renderName);
$this->render('resolved_attributes');
}
public function handleModuleResults($id)