Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15375999
D13383.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13383.diff
View Options
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
@@ -25,6 +25,8 @@
->needBuildTargets(true)
->execute();
+ list($lint, $unit) = $this->renderLintAndUnit($builds);
+
$buildable->attachBuilds($builds);
$object = $buildable->getBuildableObject();
@@ -55,6 +57,8 @@
array(
$crumbs,
$box,
+ $lint,
+ $unit,
$build_list,
$timeline,
),
@@ -251,4 +255,57 @@
return $box;
}
+ private function renderLintAndUnit(array $builds) {
+ $viewer = $this->getViewer();
+
+ $targets = array();
+ foreach ($builds as $build) {
+ foreach ($build->getBuildTargets() as $target) {
+ $targets[] = $target;
+ }
+ }
+
+ if (!$targets) {
+ return;
+ }
+
+ $target_phids = mpull($targets, 'getPHID');
+
+ $lint_data = id(new HarbormasterBuildLintMessage())->loadAllWhere(
+ 'buildTargetPHID IN (%Ls) LIMIT 25',
+ $target_phids);
+
+ $unit_data = id(new HarbormasterBuildUnitMessage())->loadAllWhere(
+ 'buildTargetPHID IN (%Ls) LIMIT 25',
+ $target_phids);
+
+ if ($lint_data) {
+ $lint_table = id(new HarbormasterLintPropertyView())
+ ->setUser($viewer)
+ ->setLintMessages($lint_data);
+
+ $lint = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Lint Messages'))
+ ->appendChild($lint_table);
+ } else {
+ $lint = null;
+ }
+
+ if ($unit_data) {
+ $unit_table = id(new HarbormasterUnitPropertyView())
+ ->setUser($viewer)
+ ->setUnitMessages($unit_data);
+
+ $unit = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Unit Tests'))
+ ->appendChild($unit_table);
+ } else {
+ $unit = null;
+ }
+
+ return array($lint, $unit);
+ }
+
+
+
}
diff --git a/src/applications/harbormaster/view/HarbormasterLintPropertyView.php b/src/applications/harbormaster/view/HarbormasterLintPropertyView.php
--- a/src/applications/harbormaster/view/HarbormasterLintPropertyView.php
+++ b/src/applications/harbormaster/view/HarbormasterLintPropertyView.php
@@ -2,7 +2,7 @@
final class HarbormasterLintPropertyView extends AphrontView {
- private $pathURIMap;
+ private $pathURIMap = array();
private $lintMessages = array();
public function setPathURIMap(array $map) {
diff --git a/src/applications/harbormaster/view/HarbormasterUnitPropertyView.php b/src/applications/harbormaster/view/HarbormasterUnitPropertyView.php
--- a/src/applications/harbormaster/view/HarbormasterUnitPropertyView.php
+++ b/src/applications/harbormaster/view/HarbormasterUnitPropertyView.php
@@ -2,7 +2,7 @@
final class HarbormasterUnitPropertyView extends AphrontView {
- private $pathURIMap;
+ private $pathURIMap = array();
private $unitMessages = array();
public function setPathURIMap(array $map) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 14, 1:10 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7480655
Default Alt Text
D13383.diff (3 KB)
Attached To
Mode
D13383: Sketch out unit/lint displaying on builds
Attached
Detach File
Event Timeline
Log In to Comment