mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 22:40:55 +01:00
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
This commit is contained in:
parent
a1431e53cc
commit
c2c8b00c5c
1 changed files with 14 additions and 25 deletions
|
@ -172,34 +172,26 @@ final class HarbormasterBuildViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
$details = $build_target->getDetails();
|
$details = $build_target->getDetails();
|
||||||
if ($details) {
|
$properties = new PHUIPropertyListView();
|
||||||
$properties = new PHUIPropertyListView();
|
foreach ($details as $key => $value) {
|
||||||
foreach ($details as $key => $value) {
|
$properties->addProperty($key, $value);
|
||||||
$properties->addProperty($key, $value);
|
|
||||||
}
|
|
||||||
$target_box->addPropertyList($properties, pht('Configuration'));
|
|
||||||
}
|
}
|
||||||
|
$target_box->addPropertyList($properties, pht('Configuration'));
|
||||||
|
|
||||||
$variables = $build_target->getVariables();
|
$variables = $build_target->getVariables();
|
||||||
if ($variables) {
|
$properties = new PHUIPropertyListView();
|
||||||
$properties = new PHUIPropertyListView();
|
$properties->addRawContent($this->buildProperties($variables));
|
||||||
$properties->addRawContent($this->buildProperties($variables));
|
$target_box->addPropertyList($properties, pht('Variables'));
|
||||||
$target_box->addPropertyList($properties, pht('Variables'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$artifacts = $this->buildArtifacts($build_target);
|
$artifacts = $this->buildArtifacts($build_target);
|
||||||
if ($artifacts) {
|
$properties = new PHUIPropertyListView();
|
||||||
$properties = new PHUIPropertyListView();
|
$properties->addRawContent($artifacts);
|
||||||
$properties->addRawContent($artifacts);
|
$target_box->addPropertyList($properties, pht('Artifacts'));
|
||||||
$target_box->addPropertyList($properties, pht('Artifacts'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$build_messages = idx($messages, $build_target->getPHID(), array());
|
$build_messages = idx($messages, $build_target->getPHID(), array());
|
||||||
if ($build_messages) {
|
$properties = new PHUIPropertyListView();
|
||||||
$properties = new PHUIPropertyListView();
|
$properties->addRawContent($this->buildMessages($build_messages));
|
||||||
$properties->addRawContent($this->buildMessages($build_messages));
|
$target_box->addPropertyList($properties, pht('Messages'));
|
||||||
$target_box->addPropertyList($properties, pht('Messages'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$properties = new PHUIPropertyListView();
|
$properties = new PHUIPropertyListView();
|
||||||
$properties->addProperty(
|
$properties->addProperty(
|
||||||
|
@ -243,11 +235,8 @@ final class HarbormasterBuildViewController
|
||||||
->withBuildTargetPHIDs(array($build_target->getPHID()))
|
->withBuildTargetPHIDs(array($build_target->getPHID()))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if (count($artifacts) === 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$list = id(new PHUIObjectItemListView())
|
$list = id(new PHUIObjectItemListView())
|
||||||
|
->setNoDataString(pht('This target has no associated artifacts.'))
|
||||||
->setFlush(true);
|
->setFlush(true);
|
||||||
|
|
||||||
foreach ($artifacts as $artifact) {
|
foreach ($artifacts as $artifact) {
|
||||||
|
|
Loading…
Reference in a new issue