mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Show commit audit status in repository history tables, including merge commit lists
Summary: Fixes T6024. Ref T12121. Currently, we show build status in commit history tables; show audit status alongside it. Also: - Change the "Author/Committer" header to just "Author"; I think it's reasonably obvious what "x/y" means (if you can't guess, you can click the commit and likely figure it out) and this gives us a little more space. - Make the audit list look more like the corresponding list in Differential, with similar formatting. Test Plan: - Viewed history of a repostiory, saw audit status. - Viewed a merge commit, saw audit status in the list of merged commits. - Viewed a commit search results list. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12121, T6024 Differential Revision: https://secure.phabricator.com/D17227
This commit is contained in:
parent
b0dfd42eef
commit
a9158d34d4
2 changed files with 28 additions and 12 deletions
|
@ -139,7 +139,9 @@ final class PhabricatorAuditListView extends AphrontView {
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setObjectName($commit_name)
|
->setObjectName($commit_name)
|
||||||
->setHeader($commit_desc)
|
->setHeader($commit_desc)
|
||||||
->setHref($commit_link);
|
->setHref($commit_link)
|
||||||
|
->addByline(pht('Author: %s', $author_name))
|
||||||
|
->addIcon('none', $committed);
|
||||||
|
|
||||||
if ($show_drafts) {
|
if ($show_drafts) {
|
||||||
if ($commit->getHasDraft($viewer)) {
|
if ($commit->getHasDraft($viewer)) {
|
||||||
|
@ -147,20 +149,16 @@ final class PhabricatorAuditListView extends AphrontView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$item
|
|
||||||
->addAttribute(pht('Author: %s', $author_name))
|
|
||||||
->addIcon('none', $committed);
|
|
||||||
|
|
||||||
$audits = $commit->getAudits();
|
$audits = $commit->getAudits();
|
||||||
$auditor_phids = mpull($audits, 'getAuditorPHID');
|
$auditor_phids = mpull($audits, 'getAuditorPHID');
|
||||||
if ($auditor_phids) {
|
if ($auditor_phids) {
|
||||||
$item->addByLine(
|
$auditor_list = $handles->newSublist($auditor_phids)
|
||||||
array(
|
->renderList()
|
||||||
pht('Auditors:'),
|
->setAsInline(true);
|
||||||
' ',
|
} else {
|
||||||
$handles->newSublist($auditor_phids)->renderList(),
|
$auditor_list = phutil_tag('em', array(), pht('None'));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
$item->addAttribute(pht('Auditors: %s', $auditor_list));
|
||||||
|
|
||||||
if ($status_color) {
|
if ($status_color) {
|
||||||
$item->setStatusIcon($status_icon.' '.$status_color, $status_text);
|
$item->setStatusIcon($status_icon.' '.$status_color, $status_text);
|
||||||
|
|
|
@ -187,6 +187,19 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
'type' => $history->getFileType(),
|
'type' => $history->getFileType(),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$status = $commit->getAuditStatus();
|
||||||
|
$icon = PhabricatorAuditCommitStatusConstants::getStatusIcon($status);
|
||||||
|
$color = PhabricatorAuditCommitStatusConstants::getStatusColor($status);
|
||||||
|
$name = PhabricatorAuditCommitStatusConstants::getStatusName($status);
|
||||||
|
|
||||||
|
$audit_view = id(new PHUIIconView())
|
||||||
|
->setIcon($icon, $color)
|
||||||
|
->addSigil('has-tooltip')
|
||||||
|
->setMetadata(
|
||||||
|
array(
|
||||||
|
'tip' => $name,
|
||||||
|
));
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
$graph ? $graph[$ii++] : null,
|
$graph ? $graph[$ii++] : null,
|
||||||
$browse,
|
$browse,
|
||||||
|
@ -194,6 +207,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
$drequest->getRepository(),
|
$drequest->getRepository(),
|
||||||
$history->getCommitIdentifier()),
|
$history->getCommitIdentifier()),
|
||||||
$build,
|
$build,
|
||||||
|
$audit_view,
|
||||||
($commit ?
|
($commit ?
|
||||||
self::linkRevision(idx($this->revisions, $commit->getPHID())) :
|
self::linkRevision(idx($this->revisions, $commit->getPHID())) :
|
||||||
null),
|
null),
|
||||||
|
@ -211,7 +225,8 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
pht('Commit'),
|
pht('Commit'),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
pht('Author/Committer'),
|
null,
|
||||||
|
pht('Author'),
|
||||||
pht('Details'),
|
pht('Details'),
|
||||||
pht('Committed'),
|
pht('Committed'),
|
||||||
));
|
));
|
||||||
|
@ -221,6 +236,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
'nudgeright',
|
'nudgeright',
|
||||||
'',
|
'',
|
||||||
'icon',
|
'icon',
|
||||||
|
'icon',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'wide',
|
'wide',
|
||||||
|
@ -232,6 +248,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
$has_any_build,
|
$has_any_build,
|
||||||
|
true,
|
||||||
$show_revisions,
|
$show_revisions,
|
||||||
));
|
));
|
||||||
$view->setDeviceVisibility(
|
$view->setDeviceVisibility(
|
||||||
|
@ -241,6 +258,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
|
Loading…
Reference in a new issue