@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Always show build target tabs, even if they have no data

Summary:
Ref T8096. Hit this on IRC:

> epriestley: what's in the Messages tab?
> jdoe: what Messages tab??!
> epriestley: ughhhh

Test Plan: Clicked "Messages" tab, saw helpful "no messages" message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13846

+14 -25
+14 -25
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 172 172 } 173 173 174 174 $details = $build_target->getDetails(); 175 - if ($details) { 176 - $properties = new PHUIPropertyListView(); 177 - foreach ($details as $key => $value) { 178 - $properties->addProperty($key, $value); 179 - } 180 - $target_box->addPropertyList($properties, pht('Configuration')); 175 + $properties = new PHUIPropertyListView(); 176 + foreach ($details as $key => $value) { 177 + $properties->addProperty($key, $value); 181 178 } 179 + $target_box->addPropertyList($properties, pht('Configuration')); 182 180 183 181 $variables = $build_target->getVariables(); 184 - if ($variables) { 185 - $properties = new PHUIPropertyListView(); 186 - $properties->addRawContent($this->buildProperties($variables)); 187 - $target_box->addPropertyList($properties, pht('Variables')); 188 - } 182 + $properties = new PHUIPropertyListView(); 183 + $properties->addRawContent($this->buildProperties($variables)); 184 + $target_box->addPropertyList($properties, pht('Variables')); 189 185 190 186 $artifacts = $this->buildArtifacts($build_target); 191 - if ($artifacts) { 192 - $properties = new PHUIPropertyListView(); 193 - $properties->addRawContent($artifacts); 194 - $target_box->addPropertyList($properties, pht('Artifacts')); 195 - } 187 + $properties = new PHUIPropertyListView(); 188 + $properties->addRawContent($artifacts); 189 + $target_box->addPropertyList($properties, pht('Artifacts')); 196 190 197 191 $build_messages = idx($messages, $build_target->getPHID(), array()); 198 - if ($build_messages) { 199 - $properties = new PHUIPropertyListView(); 200 - $properties->addRawContent($this->buildMessages($build_messages)); 201 - $target_box->addPropertyList($properties, pht('Messages')); 202 - } 192 + $properties = new PHUIPropertyListView(); 193 + $properties->addRawContent($this->buildMessages($build_messages)); 194 + $target_box->addPropertyList($properties, pht('Messages')); 203 195 204 196 $properties = new PHUIPropertyListView(); 205 197 $properties->addProperty( ··· 243 235 ->withBuildTargetPHIDs(array($build_target->getPHID())) 244 236 ->execute(); 245 237 246 - if (count($artifacts) === 0) { 247 - return null; 248 - } 249 - 250 238 $list = id(new PHUIObjectItemListView()) 239 + ->setNoDataString(pht('This target has no associated artifacts.')) 251 240 ->setFlush(true); 252 241 253 242 foreach ($artifacts as $artifact) {