Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336999
D19150.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D19150.id.diff
View Options
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php b/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php
@@ -105,7 +105,13 @@
$reads = $this->mergeOverlappingReads($reads);
foreach ($reads as $key => $read) {
- $data = $log->loadData($read['fetchOffset'], $read['fetchLength']);
+ $fetch_offset = $read['fetchOffset'];
+ $fetch_length = $read['fetchLength'];
+ if ($fetch_offset + $fetch_length > $log_size) {
+ $fetch_length = $log_size - $fetch_offset;
+ }
+
+ $data = $log->loadData($fetch_offset, $fetch_length);
$offset = $read['fetchOffset'];
$line = $read['fetchLine'];
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildLogViewController.php
@@ -16,6 +16,9 @@
return new Aphront404Response();
}
+ $target = $log->getBuildTarget();
+ $build = $target->getBuild();
+
$page_title = pht('Build Log %d', $log->getID());
$log_view = id(new HarbormasterBuildLogView())
@@ -25,6 +28,9 @@
$crumbs = $this->buildApplicationCrumbs()
->addTextCrumb(pht('Build Logs'))
+ ->addTextCrumb(
+ pht('Build %d', $build->getID()),
+ $build->getURI())
->addTextCrumb($page_title)
->setBorder(true);
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
@@ -363,12 +363,19 @@
$log_view->setLines($lines);
$log_view->setStart($start);
+ $prototype_view = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setHref($log->getURI())
+ ->setIcon('fa-file-text-o')
+ ->setText(pht('New View (Prototype)'));
+
$header = id(new PHUIHeaderView())
->setHeader(pht(
'Build Log %d (%s - %s)',
$log->getID(),
$log->getLogSource(),
$log->getLogType()))
+ ->addActionLink($prototype_view)
->setSubheader($this->createLogHeader($build, $log))
->setUser($viewer);
diff --git a/src/applications/harbormaster/view/HarbormasterBuildLogView.php b/src/applications/harbormaster/view/HarbormasterBuildLogView.php
--- a/src/applications/harbormaster/view/HarbormasterBuildLogView.php
+++ b/src/applications/harbormaster/view/HarbormasterBuildLogView.php
@@ -44,28 +44,43 @@
$header->addActionLink($download_button);
- $content_id = celerity_generate_unique_node_id();
- $content_div = javelin_tag(
- 'div',
- array(
- 'id' => $content_id,
- 'class' => 'harbormaster-log-view-loading',
- ),
- pht('Loading...'));
-
- require_celerity_resource('harbormaster-css');
-
- Javelin::initBehavior(
- 'harbormaster-log',
- array(
- 'contentNodeID' => $content_id,
- 'renderURI' => $log->getRenderURI($this->getHighlightedLineRange()),
- ));
-
$box_view = id(new PHUIObjectBoxView())
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->setHeader($header)
- ->appendChild($content_div);
+ ->setHeader($header);
+
+ $has_linemap = $log->getLineMap();
+ if ($has_linemap) {
+ $content_id = celerity_generate_unique_node_id();
+ $content_div = javelin_tag(
+ 'div',
+ array(
+ 'id' => $content_id,
+ 'class' => 'harbormaster-log-view-loading',
+ ),
+ pht('Loading...'));
+
+ require_celerity_resource('harbormaster-css');
+
+ Javelin::initBehavior(
+ 'harbormaster-log',
+ array(
+ 'contentNodeID' => $content_id,
+ 'renderURI' => $log->getRenderURI($this->getHighlightedLineRange()),
+ ));
+
+ $box_view->appendChild($content_div);
+ } else {
+ $box_view->setFormErrors(
+ array(
+ pht(
+ 'This older log is missing required rendering data. To rebuild '.
+ 'rendering data, run: %s',
+ phutil_tag(
+ 'tt',
+ array(),
+ '$ bin/harbormaster rebuild-log --force --id '.$log->getID())),
+ ));
+ }
return $box_view;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 3:38 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382487
Default Alt Text
D19150.id.diff (4 KB)
Attached To
Mode
D19150: Add a "(prototype)" link to the standalone build log on build pages
Attached
Detach File
Event Timeline
Log In to Comment