chg: [internal] Optimise loading event correlation graph

pull/6797/head
Jakub Onderka 2020-12-23 12:49:59 +01:00
parent e7076d1afc
commit a6b76e70ae
2 changed files with 11 additions and 2 deletions

View File

@ -4285,9 +4285,10 @@ class EventsController extends AppController
public function viewGraph($id)
{
// Event data are fetched by 'updateGraph', here we need just metadata.
$event = $this->Event->fetchEvent($this->Auth->user(), array(
'eventid' => $id,
'includeGranularCorrelations' => 1
'metadata' => true,
));
if (empty($event)) {
throw new MethodNotAllowedException(__('Invalid Event.'));

View File

@ -26,7 +26,15 @@
private function __expandEvent($id)
{
$event = $this->__eventModel->fetchEvent($this->__user, array('eventid' => $id, 'flatten' => 0, 'includeTagRelations' => 1, 'includeGalaxy' => 1, 'includeGranularCorrelations' => 1));
$event = $this->__eventModel->fetchEvent($this->__user, array(
'eventid' => $id,
'flatten' => 0,
'includeTagRelations' => 1,
'includeGalaxy' => 1,
'includeGranularCorrelations' => 1,
'noSightings' => true,
'sgReferenceOnly' => true,
));
if (empty($event)) {
return $this->__json;
}