mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +01:00
34076fae38
Summary: Minor spacing tweaks to Config app. Added label for consistency. Test Plan: Review pages in the Config app for spacing. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4523
75 lines
1.7 KiB
PHP
75 lines
1.7 KiB
PHP
<?php
|
|
|
|
final class PhabricatorConfigAllController
|
|
extends PhabricatorConfigController {
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
$user = $request->getUser();
|
|
|
|
$rows = array();
|
|
$options = PhabricatorApplicationConfigOptions::loadAllOptions();
|
|
ksort($options);
|
|
foreach ($options as $option) {
|
|
$key = $option->getKey();
|
|
|
|
if ($option->getMasked()) {
|
|
$value = '<em>'.pht('Masked').'</em>';
|
|
} else if ($option->getHidden()) {
|
|
$value = '<em>'.pht('Hidden').'</em>';
|
|
} else {
|
|
$value = PhabricatorEnv::getEnvConfig($key);
|
|
$value = PhabricatorConfigJSON::prettyPrintJSON($value);
|
|
$value = phutil_escape_html($value);
|
|
}
|
|
|
|
$rows[] = array(
|
|
phutil_render_tag(
|
|
'a',
|
|
array(
|
|
'href' => $this->getApplicationURI('edit/'.$key.'/'),
|
|
),
|
|
phutil_escape_html($key)),
|
|
$value,
|
|
);
|
|
}
|
|
$table = id(new AphrontTableView($rows))
|
|
->setDeviceReadyTable(true)
|
|
->setColumnClasses(
|
|
array(
|
|
'',
|
|
'wide',
|
|
))
|
|
->setHeaders(
|
|
array(
|
|
pht('Key'),
|
|
pht('Value'),
|
|
));
|
|
|
|
$title = pht('Current Settings');
|
|
|
|
$crumbs = $this
|
|
->buildApplicationCrumbs()
|
|
->addCrumb(
|
|
id(new PhabricatorCrumbView())
|
|
->setName($title));
|
|
|
|
$panel = new AphrontPanelView();
|
|
$panel->appendChild($table);
|
|
$panel->setNoBackground();
|
|
|
|
$nav = $this->buildSideNavView();
|
|
$nav->selectFilter('all/');
|
|
$nav->setCrumbs($crumbs);
|
|
$nav->appendChild($panel);
|
|
|
|
return $this->buildApplicationPage(
|
|
$nav,
|
|
array(
|
|
'title' => $title,
|
|
'device' => true,
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|