コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public function indexAction()
 {
     $this->createTabs('types', 'index');
     $repository = new EventTypeRepository();
     $this->view->eventTypes = $repository->select();
 }