Page MenuHomePhabricator

D10161.diff
No OneTemporary

D10161.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '66ada2ec',
+ 'core.pkg.css' => '519e8478',
'core.pkg.js' => '4c28870b',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '4a93db37',
@@ -137,7 +137,7 @@
'rsrc/css/phui/phui-object-box.css' => 'e9f7e938',
'rsrc/css/phui/phui-object-item-list-view.css' => '7ac40b5a',
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
- 'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
+ 'rsrc/css/phui/phui-property-list-view.css' => '86f9df88',
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => '2f562399',
@@ -787,7 +787,7 @@
'phui-object-box-css' => 'e9f7e938',
'phui-object-item-list-view-css' => '7ac40b5a',
'phui-pinboard-view-css' => '3dd4a269',
- 'phui-property-list-view-css' => '2f7199e8',
+ 'phui-property-list-view-css' => '86f9df88',
'phui-remarkup-preview-css' => '19ad512b',
'phui-spacing-css' => '042804d6',
'phui-status-list-view-css' => '2f562399',
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
@@ -23,6 +23,8 @@
return new Aphront404Response();
}
+ require_celerity_resource('harbormaster-css');
+
$title = pht('Build %d', $id);
$header = id(new PHUIHeaderView())
@@ -127,18 +129,26 @@
$target_box->addPropertyList($properties, pht('Variables'));
}
+ $artifacts = $this->buildArtifacts($build_target);
+ if ($artifacts) {
+ $properties = new PHUIPropertyListView();
+ $properties->addRawContent($artifacts);
+ $target_box->addPropertyList($properties, pht('Artifacts'));
+ }
+
+ $build_messages = idx($messages, $build_target->getPHID(), array());
+ if ($build_messages) {
+ $properties = new PHUIPropertyListView();
+ $properties->addRawContent($this->buildMessages($build_messages));
+ $target_box->addPropertyList($properties, pht('Messages'));
+ }
+
$properties = new PHUIPropertyListView();
$properties->addProperty('Build Target ID', $build_target->getID());
$target_box->addPropertyList($properties, pht('Metadata'));
$targets[] = $target_box;
- $build_messages = idx($messages, $build_target->getPHID(), array());
- if ($build_messages) {
- $targets[] = $this->buildMessages($build_messages);
- }
-
- $targets[] = $this->buildArtifacts($build_target);
$targets[] = $this->buildLog($build, $build_target);
}
@@ -163,7 +173,9 @@
));
}
- private function buildArtifacts(HarbormasterBuildTarget $build_target) {
+ private function buildArtifacts(
+ HarbormasterBuildTarget $build_target) {
+
$request = $this->getRequest();
$viewer = $request->getUser();
@@ -176,20 +188,14 @@
return null;
}
- $list = new PHUIObjectItemListView();
+ $list = id(new PHUIObjectItemListView())
+ ->setFlush(true);
foreach ($artifacts as $artifact) {
$list->addItem($artifact->getObjectItemView($viewer));
}
- $header = id(new PHUIHeaderView())
- ->setHeader(pht('Build Artifacts'))
- ->setUser($viewer);
-
- $box = id(new PHUIObjectBoxView())
- ->setHeader($header);
-
- return array($box, $list);
+ return $list;
}
private function buildLog(
@@ -247,8 +253,6 @@
->setForm($log_view);
if ($is_empty) {
- require_celerity_resource('harbormaster-css');
-
$log_box = phutil_tag(
'div',
array(
@@ -475,11 +479,7 @@
'date',
));
- $box = id(new PHUIObjectBoxView())
- ->setHeaderText(pht('Build Target Messages'))
- ->appendChild($table);
-
- return $box;
+ return $table;
}
diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php
--- a/src/view/phui/PHUIPropertyListView.php
+++ b/src/view/phui/PHUIPropertyListView.php
@@ -81,6 +81,14 @@
return $this;
}
+ public function addRawContent($content) {
+ $this->parts[] = array(
+ 'type' => 'raw',
+ 'content' => $content,
+ );
+ return $this;
+ }
+
public function addImageContent($content) {
$this->parts[] = array(
'type' => 'image',
@@ -143,6 +151,9 @@
case 'image':
$items[] = $this->renderTextPart($part);
break;
+ case 'raw':
+ $items[] = $this->renderRawPart($part);
+ break;
default:
throw new Exception(pht("Unknown part type '%s'!", $type));
}
@@ -263,4 +274,15 @@
$part['content']);
}
+ private function renderRawPart(array $part) {
+ $classes = array();
+ $classes[] = 'phui-property-list-raw-content';
+ return phutil_tag(
+ 'div',
+ array(
+ 'class' => implode($classes, ' '),
+ ),
+ $part['content']);
+ }
+
}
diff --git a/webroot/rsrc/css/phui/phui-property-list-view.css b/webroot/rsrc/css/phui/phui-property-list-view.css
--- a/webroot/rsrc/css/phui/phui-property-list-view.css
+++ b/webroot/rsrc/css/phui/phui-property-list-view.css
@@ -118,6 +118,12 @@
padding: 8px;
}
+.phui-property-list-raw-content {
+ padding: 0px;
+ background: #fff;
+ overflow: hidden;
+}
+
/* In the common case where we immediately follow a header, move back up 30px
so we snuggle next to the header. */
.device-desktop .phui-header-view

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 11, 1:17 PM (1 w, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747190
Default Alt Text
D10161.diff (5 KB)

Event Timeline