2013-01-16 20:10:41 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorConfigAllController
|
|
|
|
extends PhabricatorConfigController {
|
|
|
|
|
2015-07-27 18:06:26 +02:00
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
|
|
$viewer = $request->getViewer();
|
2013-01-16 20:10:41 +01:00
|
|
|
|
2013-04-13 18:31:24 +02:00
|
|
|
$db_values = id(new PhabricatorConfigEntry())
|
|
|
|
->loadAllWhere('namespace = %s', 'default');
|
|
|
|
$db_values = mpull($db_values, null, 'getConfigKey');
|
|
|
|
|
2013-01-16 20:10:41 +01:00
|
|
|
$rows = array();
|
|
|
|
$options = PhabricatorApplicationConfigOptions::loadAllOptions();
|
2013-01-16 20:39:13 +01:00
|
|
|
ksort($options);
|
2013-01-16 20:10:41 +01:00
|
|
|
foreach ($options as $option) {
|
|
|
|
$key = $option->getKey();
|
|
|
|
|
2015-02-13 19:59:50 +01:00
|
|
|
if ($option->getHidden()) {
|
2013-02-13 23:50:15 +01:00
|
|
|
$value = phutil_tag('em', array(), pht('Hidden'));
|
2013-01-16 20:10:41 +01:00
|
|
|
} else {
|
|
|
|
$value = PhabricatorEnv::getEnvConfig($key);
|
|
|
|
$value = PhabricatorConfigJSON::prettyPrintJSON($value);
|
|
|
|
}
|
|
|
|
|
2013-04-13 18:31:24 +02:00
|
|
|
$db_value = idx($db_values, $key);
|
2013-01-16 20:10:41 +01:00
|
|
|
$rows[] = array(
|
2013-01-18 03:43:35 +01:00
|
|
|
phutil_tag(
|
2013-01-16 20:10:41 +01:00
|
|
|
'a',
|
|
|
|
array(
|
|
|
|
'href' => $this->getApplicationURI('edit/'.$key.'/'),
|
|
|
|
),
|
2013-01-18 03:43:35 +01:00
|
|
|
$key),
|
2013-01-16 20:10:41 +01:00
|
|
|
$value,
|
2013-04-13 18:31:24 +02:00
|
|
|
$db_value && !$db_value->getIsDeleted() ? pht('Customized') : '',
|
2013-01-16 20:10:41 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
$table = id(new AphrontTableView($rows))
|
|
|
|
->setColumnClasses(
|
|
|
|
array(
|
|
|
|
'',
|
|
|
|
'wide',
|
|
|
|
))
|
|
|
|
->setHeaders(
|
|
|
|
array(
|
|
|
|
pht('Key'),
|
|
|
|
pht('Value'),
|
2013-04-13 18:31:24 +02:00
|
|
|
pht('Customized'),
|
2013-01-16 20:10:41 +01:00
|
|
|
));
|
|
|
|
|
|
|
|
$title = pht('Current Settings');
|
|
|
|
|
|
|
|
$crumbs = $this
|
|
|
|
->buildApplicationCrumbs()
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-30 00:36:13 +02:00
|
|
|
->addTextCrumb($title)
|
|
|
|
->setBorder(true);
|
2013-01-16 20:10:41 +01:00
|
|
|
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-30 00:36:13 +02:00
|
|
|
$header = id(new PHUIHeaderView())
|
|
|
|
->setHeader($title)
|
|
|
|
->setProfileHeader(true);
|
2013-01-19 03:08:06 +01:00
|
|
|
|
2013-01-16 20:10:41 +01:00
|
|
|
$nav = $this->buildSideNavView();
|
|
|
|
$nav->selectFilter('all/');
|
2016-04-09 00:00:38 +02:00
|
|
|
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-30 00:36:13 +02:00
|
|
|
$content = id(new PhabricatorConfigPageView())
|
|
|
|
->setHeader($header)
|
|
|
|
->setContent($table);
|
2013-01-16 20:10:41 +01:00
|
|
|
|
2016-04-03 02:27:39 +02:00
|
|
|
return $this->newPage()
|
|
|
|
->setTitle($title)
|
2016-04-09 00:00:38 +02:00
|
|
|
->setCrumbs($crumbs)
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-30 00:36:13 +02:00
|
|
|
->setNavigation($nav)
|
|
|
|
->appendChild($content)
|
2016-10-01 21:35:13 +02:00
|
|
|
->addClass('white-background');
|
2013-01-19 19:24:46 +01:00
|
|
|
|
2013-01-16 20:10:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|