2015-01-01 06:51:44 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorConfigHistoryController
|
|
|
|
extends PhabricatorConfigController {
|
|
|
|
|
2015-07-27 09:06:26 -07:00
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
|
|
$viewer = $request->getViewer();
|
|
|
|
$id = $request->getURIData('id');
|
2015-01-01 06:51:44 -08:00
|
|
|
|
|
|
|
$xactions = id(new PhabricatorConfigTransactionQuery())
|
2015-07-27 09:06:26 -07:00
|
|
|
->setViewer($viewer)
|
2015-01-01 06:51:44 -08:00
|
|
|
->needComments(true)
|
|
|
|
->execute();
|
|
|
|
|
|
|
|
$object = new PhabricatorConfigEntry();
|
|
|
|
|
|
|
|
$xaction = $object->getApplicationTransactionTemplate();
|
|
|
|
|
|
|
|
$view = $xaction->getApplicationTransactionViewObject();
|
|
|
|
|
|
|
|
$timeline = $view
|
2015-07-27 09:06:26 -07:00
|
|
|
->setUser($viewer)
|
2015-01-01 06:51:44 -08:00
|
|
|
->setTransactions($xactions)
|
|
|
|
->setRenderAsFeed(true)
|
|
|
|
->setObjectPHID(PhabricatorPHIDConstants::PHID_VOID);
|
|
|
|
|
|
|
|
$timeline->setShouldTerminate(true);
|
|
|
|
|
|
|
|
$object->willRenderTimeline($timeline, $this->getRequest());
|
|
|
|
|
|
|
|
$title = pht('Settings History');
|
|
|
|
|
|
|
|
$crumbs = $this->buildApplicationCrumbs();
|
2015-01-28 09:33:49 -08:00
|
|
|
$crumbs->setBorder(true);
|
2015-01-01 06:51:44 -08:00
|
|
|
$crumbs->addTextCrumb('Config', $this->getApplicationURI());
|
|
|
|
$crumbs->addTextCrumb($title, '/config/history/');
|
|
|
|
|
2015-01-27 12:26:15 -08:00
|
|
|
$nav = $this->buildSideNavView();
|
|
|
|
$nav->selectFilter('history/');
|
|
|
|
$nav->setCrumbs($crumbs);
|
|
|
|
$nav->appendChild($timeline);
|
|
|
|
|
2016-04-03 00:27:39 +00:00
|
|
|
return $this->newPage()
|
|
|
|
->setTitle($title)
|
|
|
|
->appendChild($nav);
|
2015-01-01 06:51:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|