Add a basic view for repository pull logs

Summary:
Depends on D18912. Ref T13046. Add a UI to browse the existing pull log table.

The actual log still has some significant flaws, but get the basics working.

Test Plan: {F5391909}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13046

Differential Revision: https://secure.phabricator.com/D18914
This commit is contained in:
epriestley
2018-01-22 20:09:52 -08:00
parent 2914613444
commit e6a9db56a9
11 changed files with 304 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
<?php
abstract class DiffusionPushLogController extends DiffusionController {
abstract class DiffusionLogController extends DiffusionController {
protected function shouldLoadDiffusionRequest() {
return false;

View File

@@ -0,0 +1,12 @@
<?php
final class DiffusionPullLogListController
extends DiffusionLogController {
public function handleRequest(AphrontRequest $request) {
return id(new DiffusionPullLogSearchEngine())
->setController($this)
->buildResponse();
}
}

View File

@@ -1,11 +1,7 @@
<?php
final class DiffusionPushEventViewController
extends DiffusionPushLogController {
public function shouldAllowPublic() {
return true;
}
extends DiffusionLogController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();

View File

@@ -1,10 +1,7 @@
<?php
final class DiffusionPushLogListController extends DiffusionPushLogController {
public function shouldAllowPublic() {
return true;
}
final class DiffusionPushLogListController
extends DiffusionLogController {
public function handleRequest(AphrontRequest $request) {
return id(new PhabricatorRepositoryPushLogSearchEngine())

View File

@@ -365,7 +365,7 @@ final class DiffusionRepositoryController extends DiffusionController {
if ($repository->isHosted()) {
$push_uri = $this->getApplicationURI(
'pushlog/?repositories='.$repository->getMonogram());
'pushlog/?repositories='.$repository->getPHID());
$action_view->addAction(
id(new PhabricatorActionView())
@@ -374,6 +374,15 @@ final class DiffusionRepositoryController extends DiffusionController {
->setHref($push_uri));
}
$pull_uri = $this->getApplicationURI(
'pulllog/?repositories='.$repository->getPHID());
$action_view->addAction(
id(new PhabricatorActionView())
->setName(pht('View Pull Logs'))
->setIcon('fa-list-alt')
->setHref($pull_uri));
return $action_view;
}