Differential D14096 Diff 34071 src/applications/diffusion/controller/DiffusionRepositoryController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryController.php
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | $content[] = $this->buildBrowseTable( | ||||
$browse_results, | $browse_results, | ||||
$browse_paths, | $browse_paths, | ||||
$browse_exception, | $browse_exception, | ||||
$handles); | $handles); | ||||
$content[] = $this->buildHistoryTable( | $content[] = $this->buildHistoryTable( | ||||
$history_results, | $history_results, | ||||
$history, | $history, | ||||
$history_exception, | $history_exception); | ||||
$handles); | |||||
try { | try { | ||||
$content[] = $this->buildTagListTable($drequest); | $content[] = $this->buildTagListTable($drequest); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
if (!$repository->isImporting()) { | if (!$repository->isImporting()) { | ||||
$content[] = $this->renderStatusMessage( | $content[] = $this->renderStatusMessage( | ||||
pht('Unable to Load Tags'), | pht('Unable to Load Tags'), | ||||
$ex->getMessage()); | $ex->getMessage()); | ||||
▲ Show 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | private function buildActionList(PhabricatorRepository $repository) { | ||||
} | } | ||||
return $view; | return $view; | ||||
} | } | ||||
private function buildHistoryTable( | private function buildHistoryTable( | ||||
$history_results, | $history_results, | ||||
$history, | $history, | ||||
$history_exception, | $history_exception) { | ||||
array $handles) { | |||||
$request = $this->getRequest(); | $request = $this->getRequest(); | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
$drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
$repository = $drequest->getRepository(); | $repository = $drequest->getRepository(); | ||||
if ($history_exception) { | if ($history_exception) { | ||||
if ($repository->isImporting()) { | if ($repository->isImporting()) { | ||||
return $this->renderStatusMessage( | return $this->renderStatusMessage( | ||||
pht('Still Importing...'), | pht('Still Importing...'), | ||||
pht( | pht( | ||||
'This repository is still importing. History is not yet '. | 'This repository is still importing. History is not yet '. | ||||
'available.')); | 'available.')); | ||||
} else { | } else { | ||||
return $this->renderStatusMessage( | return $this->renderStatusMessage( | ||||
pht('Unable to Retrieve History'), | pht('Unable to Retrieve History'), | ||||
$history_exception->getMessage()); | $history_exception->getMessage()); | ||||
} | } | ||||
} | } | ||||
$history_table = id(new DiffusionHistoryTableView()) | $history_table = id(new DiffusionHistoryTableView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setDiffusionRequest($drequest) | ->setDiffusionRequest($drequest) | ||||
->setHandles($handles) | |||||
->setHistory($history); | ->setHistory($history); | ||||
// TODO: Super sketchy. | // TODO: Super sketchy. | ||||
$history_table->loadRevisions(); | $history_table->loadRevisions(); | ||||
if ($history_results) { | if ($history_results) { | ||||
$history_table->setParents($history_results['parents']); | $history_table->setParents($history_results['parents']); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |