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:
@@ -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,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user