mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 13:52:40 +01:00
Don't display "Loading..." for coverage which will never load
Summary: In very large diffs. Test Plan: Display very large diff. Display normal diff. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1918
This commit is contained in:
parent
9f849b9fab
commit
a70466a7fd
3 changed files with 11 additions and 3 deletions
|
@ -105,7 +105,8 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
$changesets = msort($changesets, 'getSortKey');
|
||||
|
||||
$table_of_contents = id(new DifferentialDiffTableOfContentsView())
|
||||
->setChangesets($changesets);
|
||||
->setChangesets($changesets)
|
||||
->setVisibleChangesets($changesets);
|
||||
|
||||
$refs = array();
|
||||
foreach ($changesets as $changeset) {
|
||||
|
|
|
@ -267,6 +267,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
|
||||
$toc_view = new DifferentialDiffTableOfContentsView();
|
||||
$toc_view->setChangesets($changesets);
|
||||
$toc_view->setVisibleChangesets($visible_changesets);
|
||||
$toc_view->setUnitTestData(idx($props, 'arc:unit', array()));
|
||||
if ($repository) {
|
||||
$toc_view->setRepository($repository);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
final class DifferentialDiffTableOfContentsView extends AphrontView {
|
||||
|
||||
private $changesets = array();
|
||||
private $visibleChangesets = array();
|
||||
private $repository;
|
||||
private $diff;
|
||||
private $user;
|
||||
|
@ -33,6 +34,11 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setVisibleChangesets($visible_changesets) {
|
||||
$this->visibleChangesets = $visible_changesets;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setRepository(PhabricatorRepository $repository) {
|
||||
$this->repository = $repository;
|
||||
return $this;
|
||||
|
@ -99,7 +105,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
|
||||
$changesets = $this->changesets;
|
||||
$paths = array();
|
||||
foreach ($changesets as $changeset) {
|
||||
foreach ($changesets as $id => $changeset) {
|
||||
$type = $changeset->getChangeType();
|
||||
$ftype = $changeset->getFileType();
|
||||
$link = $this->renderChangesetLink($changeset);
|
||||
|
@ -163,7 +169,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
'id' => 'differential-mcoverage-'.md5($fname),
|
||||
'class' => 'differential-mcoverage-loading',
|
||||
),
|
||||
'Loading...');
|
||||
(isset($this->visibleChangesets[$id]) ? 'Loading...' : '?'));
|
||||
}
|
||||
|
||||
$rows[] =
|
||||
|
|
Loading…
Reference in a new issue