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:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DiffusionPushLogController extends DiffusionController {
|
||||
abstract class DiffusionLogController extends DiffusionController {
|
||||
|
||||
protected function shouldLoadDiffusionRequest() {
|
||||
return false;
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionPullLogListController
|
||||
extends DiffusionLogController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
return id(new DiffusionPullLogSearchEngine())
|
||||
->setController($this)
|
||||
->buildResponse();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user