Modularize config modules + add edges, phid modules

Summary: Fixes T6859. Adds a readout in `/config/` of installed edge and PHID types. See also D13626.

Test Plan: {F643222}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6859

Differential Revision: https://secure.phabricator.com/D13662
This commit is contained in:
epriestley
2015-07-20 17:08:37 -07:00
parent e0bba9bae7
commit ffa4cae627
9 changed files with 210 additions and 60 deletions

View File

@@ -0,0 +1,37 @@
<?php
final class PhabricatorConfigModuleController
extends PhabricatorConfigController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$key = $request->getURIData('module');
$all_modules = PhabricatorConfigModule::getAllModules();
if (empty($all_modules[$key])) {
return new Aphront404Response();
}
$module = $all_modules[$key];
$content = $module->renderModuleStatus($request);
$name = $module->getModuleName();
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($name);
$nav = $this->buildSideNavView();
$nav->selectFilter('module/'.$key.'/');
$nav->appendChild(
array(
$crumbs,
$content,
));
return $this->buildApplicationPage(
$nav,
array(
'title' => $name,
));
}
}