mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 07:20:57 +01:00
75c47c6ae0
Summary: Ref T4677. This shows a more detailed view of an entire "git push", "hg push", or "svn commit". This is mostly to give push summary emails a reasonable, stable URI to link to for T4677. Test Plan: - Pushed into SVN, Git and Mercurial. - Viewed partial and imported event records. {F134864} Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4677 Differential Revision: https://secure.phabricator.com/D8616
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
|
|
final class DiffusionPushLogListController extends DiffusionPushLogController
|
|
implements PhabricatorApplicationSearchResultsControllerInterface {
|
|
|
|
private $queryKey;
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->queryKey = idx($data, 'queryKey');
|
|
}
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
$controller = id(new PhabricatorApplicationSearchController($request))
|
|
->setQueryKey($this->queryKey)
|
|
->setSearchEngine(new PhabricatorRepositoryPushLogSearchEngine())
|
|
->setNavigation($this->buildSideNavView());
|
|
|
|
return $this->delegateToController($controller);
|
|
}
|
|
|
|
public function renderResultsList(
|
|
array $logs,
|
|
PhabricatorSavedQuery $query) {
|
|
|
|
$table = $this->renderPushLogTable($logs);
|
|
|
|
$box = id(new PHUIBoxView())
|
|
->addMargin(PHUI::MARGIN_LARGE)
|
|
->appendChild($table);
|
|
|
|
return $box;
|
|
}
|
|
|
|
public function buildSideNavView($for_app = false) {
|
|
$viewer = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
id(new PhabricatorRepositoryPushLogSearchEngine())
|
|
->setViewer($viewer)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
}
|