Differential D19150 Diff 45881 src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php
| Show All 10 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| $log = id(new HarbormasterBuildLogQuery()) | $log = id(new HarbormasterBuildLogQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withIDs(array($id)) | ->withIDs(array($id)) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$log) { | if (!$log) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $target = $log->getBuildTarget(); | |||||
| $build = $target->getBuild(); | |||||
| $page_title = pht('Build Log %d', $log->getID()); | $page_title = pht('Build Log %d', $log->getID()); | ||||
| $log_view = id(new HarbormasterBuildLogView()) | $log_view = id(new HarbormasterBuildLogView()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->setBuildLog($log) | ->setBuildLog($log) | ||||
| ->setHighlightedLineRange($request->getURIData('lines')); | ->setHighlightedLineRange($request->getURIData('lines')); | ||||
| $crumbs = $this->buildApplicationCrumbs() | $crumbs = $this->buildApplicationCrumbs() | ||||
| ->addTextCrumb(pht('Build Logs')) | ->addTextCrumb(pht('Build Logs')) | ||||
| ->addTextCrumb( | |||||
| pht('Build %d', $build->getID()), | |||||
| $build->getURI()) | |||||
| ->addTextCrumb($page_title) | ->addTextCrumb($page_title) | ||||
| ->setBorder(true); | ->setBorder(true); | ||||
| $page_header = id(new PHUIHeaderView()) | $page_header = id(new PHUIHeaderView()) | ||||
| ->setHeader($page_title); | ->setHeader($page_title); | ||||
| $page_view = id(new PHUITwoColumnView()) | $page_view = id(new PHUITwoColumnView()) | ||||
| ->setHeader($page_header) | ->setHeader($page_header) | ||||
| Show All 9 Lines | |||||