Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14013633
D10161.id24445.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D10161.id24445.diff
View Options
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' => 'cd8c18d3',
+ 'core.pkg.css' => '40c5a957',
'core.pkg.js' => 'ba6a742f',
'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',
@@ -789,7 +789,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())
@@ -133,18 +135,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);
}
@@ -169,7 +179,9 @@
));
}
- private function buildArtifacts(HarbormasterBuildTarget $build_target) {
+ private function buildArtifacts(
+ HarbormasterBuildTarget $build_target) {
+
$request = $this->getRequest();
$viewer = $request->getUser();
@@ -182,20 +194,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(
@@ -253,8 +259,6 @@
->setForm($log_view);
if ($is_empty) {
- require_celerity_resource('harbormaster-css');
-
$log_box = phutil_tag(
'div',
array(
@@ -494,11 +498,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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 3, 8:09 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735134
Default Alt Text
D10161.id24445.diff (5 KB)
Attached To
Mode
D10161: Move artifacts and build target messages into tabs
Attached
Detach File
Event Timeline
Log In to Comment