mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 03:42:41 +01:00
f6a13fd1c7
Summary: Ref T2222. This will probably have some rough edges for a bit (e.g., weird cases I didn't remember or think of), but there's no change to the underlying data and we can easily revert if things get too messy. Test Plan: Looked at a variety of revisions and saw sensible output. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8361
39 lines
747 B
PHP
39 lines
747 B
PHP
<?php
|
|
|
|
final class DifferentialHostField
|
|
extends DifferentialCustomField {
|
|
|
|
public function getFieldKey() {
|
|
return 'differential:host';
|
|
}
|
|
|
|
public function getFieldName() {
|
|
return pht('Host');
|
|
}
|
|
|
|
public function getFieldDescription() {
|
|
return pht('Shows the local host where the diff came from.');
|
|
}
|
|
|
|
public function shouldDisableByDefault() {
|
|
return true;
|
|
}
|
|
|
|
public function shouldAppearInPropertyView() {
|
|
return true;
|
|
}
|
|
|
|
public function renderPropertyViewLabel() {
|
|
return $this->getFieldName();
|
|
}
|
|
|
|
public function renderPropertyViewValue(array $handles) {
|
|
$host = $this->getObject()->getActiveDiff()->getSourceMachine();
|
|
if (!$host) {
|
|
return null;
|
|
}
|
|
|
|
return $host;
|
|
}
|
|
|
|
}
|