Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/customfield/DifferentialLintField.php
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | public function getWarningsForDetailView() { | ||||
return $warnings; | return $warnings; | ||||
} | } | ||||
protected function renderHarbormasterStatus( | protected function renderHarbormasterStatus( | ||||
DifferentialDiff $diff, | DifferentialDiff $diff, | ||||
array $messages) { | array $messages) { | ||||
$status = $diff->getSummaryLintStatus(); | |||||
$colors = array( | $colors = array( | ||||
DifferentialLintStatus::LINT_NONE => 'grey', | DifferentialLintStatus::LINT_NONE => 'grey', | ||||
DifferentialLintStatus::LINT_OKAY => 'green', | DifferentialLintStatus::LINT_OKAY => 'green', | ||||
DifferentialLintStatus::LINT_WARN => 'yellow', | DifferentialLintStatus::LINT_WARN => 'yellow', | ||||
DifferentialLintStatus::LINT_FAIL => 'red', | DifferentialLintStatus::LINT_FAIL => 'red', | ||||
DifferentialLintStatus::LINT_SKIP => 'blue', | DifferentialLintStatus::LINT_SKIP => 'blue', | ||||
DifferentialLintStatus::LINT_AUTO_SKIP => 'blue', | DifferentialLintStatus::LINT_AUTO_SKIP => 'blue', | ||||
); | ); | ||||
$icon_color = idx($colors, $diff->getLintStatus(), 'grey'); | $icon_color = idx($colors, $status, 'grey'); | ||||
$message = DifferentialRevisionUpdateHistoryView::getDiffLintMessage($diff); | $message = DifferentialRevisionUpdateHistoryView::getDiffLintMessage( | ||||
$status); | |||||
$excuse = $diff->getProperty('arc:lint-excuse'); | $excuse = $diff->getProperty('arc:lint-excuse'); | ||||
if (strlen($excuse)) { | if (strlen($excuse)) { | ||||
$excuse = array( | $excuse = array( | ||||
phutil_tag('strong', array(), pht('Excuse:')), | phutil_tag('strong', array(), pht('Excuse:')), | ||||
' ', | ' ', | ||||
phutil_escape_html_newlines($excuse), | phutil_escape_html_newlines($excuse), | ||||
); | ); | ||||
Show All 26 Lines |