[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/daemon/controller/ -> PhabricatorDaemonLogEventViewController.php (source)

   1  <?php
   2  
   3  final class PhabricatorDaemonLogEventViewController
   4    extends PhabricatorDaemonController {
   5  
   6    private $id;
   7  
   8    public function willProcessRequest(array $data) {
   9      $this->id = $data['id'];
  10    }
  11  
  12    public function processRequest() {
  13      $request = $this->getRequest();
  14  
  15      $event = id(new PhabricatorDaemonLogEvent())->load($this->id);
  16      if (!$event) {
  17        return new Aphront404Response();
  18      }
  19  
  20      $event_view = id(new PhabricatorDaemonLogEventsView())
  21        ->setEvents(array($event))
  22        ->setUser($request->getUser())
  23        ->setCombinedLog(true)
  24        ->setShowFullMessage(true);
  25  
  26      $log_panel = new AphrontPanelView();
  27      $log_panel->appendChild($event_view);
  28      $log_panel->setNoBackground();
  29  
  30      $daemon_id = $event->getLogID();
  31  
  32      $crumbs = $this->buildApplicationCrumbs()
  33        ->addTextCrumb(
  34          pht('Daemon %s', $daemon_id),
  35          $this->getApplicationURI("log/{$daemon_id}/"))
  36        ->addTextCrumb(pht('Event %s', $event->getID()));
  37  
  38  
  39      return $this->buildApplicationPage(
  40        array(
  41          $crumbs,
  42          $log_panel,
  43        ),
  44        array(
  45          'title' => pht('Combined Daemon Log'),
  46          'device' => false,
  47        ));
  48    }
  49  
  50  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1