public function indexAction()
 {
     $this->createTabs('main', 'overview');
     $this->view->configAdmin = $this->hasPermission('config/elasticsearch');
     $this->view->canTypes = $this->hasPermission('elasticsearch/events');
     $repository = new EventTypeRepository();
     $query = $repository->select();
     $this->filterEventTypes($query);
     $this->view->eventTypes = $query;
 }
 public function showAction()
 {
     $this->createTabs('event', 'show');
     $type = $this->getParam('type');
     if ($type === null) {
         throw new IcingaException('You need to specify a type to show events from!');
     }
     $this->assertEventType($type);
     $id = $this->getParam('id');
     if ($id === null) {
         throw new IcingaException('You need to specify the event id!');
     }
     $this->view->eventType = $eventType = EventTypeRepository::load($type);
     $this->view->event = Event::fromRepository($eventType->getEventQuery(), $id);
 }
 public function indexAction()
 {
     $this->createTabs('types', 'index');
     $repository = new EventTypeRepository();
     $this->view->eventTypes = $repository->select();
 }