mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-23 13:08:18 +01:00
Remove lint message counts from Diffusion repository list
Summary: We should bring these back some day, but they should be denormalized, inside the query, and there should be a better pipeline to build them in the first place. Just get rid of them for now; this essentially impacts only us. Test Plan: Loaded `/diffusion/`, same page minus lint counts. Reviewers: btrahan Reviewed By: btrahan CC: aran, vrana Differential Revision: https://secure.phabricator.com/D6915
This commit is contained in:
parent
93c6704059
commit
19eeafa303
1 changed files with 2 additions and 34 deletions
|
@ -52,19 +52,7 @@ final class DiffusionHomeController extends DiffusionController {
|
||||||
}
|
}
|
||||||
$repositories = msort($repositories, 'getName');
|
$repositories = msort($repositories, 'getName');
|
||||||
|
|
||||||
$branch = new PhabricatorRepositoryBranch();
|
|
||||||
$lint_messages = queryfx_all(
|
|
||||||
$branch->establishConnection('r'),
|
|
||||||
'SELECT b.repositoryID, b.name, COUNT(lm.id) AS n
|
|
||||||
FROM %T b
|
|
||||||
LEFT JOIN %T lm ON b.id = lm.branchID
|
|
||||||
GROUP BY b.id',
|
|
||||||
$branch->getTableName(),
|
|
||||||
PhabricatorRepository::TABLE_LINTMESSAGE);
|
|
||||||
$lint_messages = igroup($lint_messages, 'repositoryID');
|
|
||||||
|
|
||||||
$rows = array();
|
$rows = array();
|
||||||
$show_lint = false;
|
|
||||||
foreach ($repositories as $repository) {
|
foreach ($repositories as $repository) {
|
||||||
$id = $repository->getID();
|
$id = $repository->getID();
|
||||||
|
|
||||||
|
@ -79,22 +67,6 @@ final class DiffusionHomeController extends DiffusionController {
|
||||||
pht('%s Commits', new PhutilNumber($size)));
|
pht('%s Commits', new PhutilNumber($size)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$lint_count = '';
|
|
||||||
$lint_branches = ipull(idx($lint_messages, $id, array()), 'n', 'name');
|
|
||||||
$branch = $repository->getDefaultArcanistBranch();
|
|
||||||
if (isset($lint_branches[$branch])) {
|
|
||||||
$show_lint = true;
|
|
||||||
$lint_count = phutil_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => DiffusionRequest::generateDiffusionURI(array(
|
|
||||||
'callsign' => $repository->getCallsign(),
|
|
||||||
'action' => 'lint',
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
pht('%s Lint Messages', new PhutilNumber($lint_branches[$branch])));
|
|
||||||
}
|
|
||||||
|
|
||||||
$datetime = '';
|
$datetime = '';
|
||||||
$most_recent_commit = $repository->getMostRecentCommit();
|
$most_recent_commit = $repository->getMostRecentCommit();
|
||||||
if ($most_recent_commit) {
|
if ($most_recent_commit) {
|
||||||
|
@ -109,7 +81,6 @@ final class DiffusionHomeController extends DiffusionController {
|
||||||
PhabricatorRepositoryType::getNameForRepositoryType(
|
PhabricatorRepositoryType::getNameForRepositoryType(
|
||||||
$repository->getVersionControlSystem()),
|
$repository->getVersionControlSystem()),
|
||||||
$size ? $size : null,
|
$size ? $size : null,
|
||||||
$lint_count,
|
|
||||||
$most_recent_commit
|
$most_recent_commit
|
||||||
? DiffusionView::linkCommit(
|
? DiffusionView::linkCommit(
|
||||||
$repository,
|
$repository,
|
||||||
|
@ -151,14 +122,11 @@ final class DiffusionHomeController extends DiffusionController {
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setHeader($row[0])
|
->setHeader($row[0])
|
||||||
->setSubHead($row[5])
|
->setSubHead($row[4])
|
||||||
->setHref($row[1])
|
->setHref($row[1])
|
||||||
->addAttribute(($row[2] ? $row[2] : pht('No Information')))
|
->addAttribute(($row[2] ? $row[2] : pht('No Information')))
|
||||||
->addAttribute(($row[3] ? $row[3] : pht('0 Commits')))
|
->addAttribute(($row[3] ? $row[3] : pht('0 Commits')))
|
||||||
->addIcon('none', $row[6]);
|
->addIcon('none', $row[5]);
|
||||||
if ($show_lint) {
|
|
||||||
$item->addAttribute($row[4]);
|
|
||||||
}
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue