Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/view/HarbormasterUnitSummaryView.php
Show All 34 Lines | final class HarbormasterUnitSummaryView extends AphrontView { | ||||
public function render() { | public function render() { | ||||
$messages = $this->messages; | $messages = $this->messages; | ||||
$buildable = $this->buildable; | $buildable = $this->buildable; | ||||
$id = $buildable->getID(); | $id = $buildable->getID(); | ||||
$full_uri = "/harbormaster/unit/{$id}/"; | $full_uri = "/harbormaster/unit/{$id}/"; | ||||
// T10635: most of this information is already aggregated in BuildTarget. | |||||
$messages = msort($messages, 'getSortKey'); | $messages = msort($messages, 'getSortKey'); | ||||
$head_unit = head($messages); | $head_unit = head($messages); | ||||
if ($head_unit) { | if ($head_unit) { | ||||
$status = $head_unit->getResult(); | $status = $head_unit->getResult(); | ||||
$tag_text = HarbormasterUnitStatus::getUnitStatusLabel($status); | $tag_text = HarbormasterUnitStatus::getUnitStatusLabel($status); | ||||
$tag_color = HarbormasterUnitStatus::getUnitStatusColor($status); | $tag_color = HarbormasterUnitStatus::getUnitStatusColor($status); | ||||
$tag_icon = HarbormasterUnitStatus::getUnitStatusIcon($status); | $tag_icon = HarbormasterUnitStatus::getUnitStatusIcon($status); | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |