Page MenuHomePhorge

No OneTemporary

diff --git a/src/aphront/console/plugin/config/DarkConsoleConfigPlugin.php b/src/aphront/console/plugin/config/DarkConsoleConfigPlugin.php
index 853e0c4ef1..bd67c45f2b 100755
--- a/src/aphront/console/plugin/config/DarkConsoleConfigPlugin.php
+++ b/src/aphront/console/plugin/config/DarkConsoleConfigPlugin.php
@@ -1,69 +1,100 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class DarkConsoleConfigPlugin extends DarkConsolePlugin {
public function getName() {
return 'Config';
}
public function getDescription() {
return 'Information about Phabricator configuration';
}
public function generateData() {
- return PhabricatorEnv::getAllConfigKeys();
+ $lib_data = array();
+ foreach (PhutilBootloader::getInstance()->getAllLibraries() as $lib) {
+ $lib_data[$lib] = phutil_get_library_root($lib);
+ }
+ return array(
+ 'config' => PhabricatorEnv::getAllConfigKeys(),
+ 'libraries' => $lib_data,
+ );
}
public function render() {
$data = $this->getData();
- ksort($data);
-
+
+ $lib_data = $data['libraries'];
+
+ $lib_rows = array();
+ foreach ($lib_data as $key => $value) {
+ $lib_rows[] = array(
+ phutil_escape_html($key),
+ phutil_escape_html($value),
+ );
+ }
+
+ $lib_table = new AphrontTableView($lib_rows);
+ $lib_table->setHeaders(
+ array(
+ 'Library',
+ 'Loaded From',
+ ));
+ $lib_table->setColumnClasses(
+ array(
+ 'header',
+ 'wide wrap',
+ ));
+
+ $config_data = $data['config'];
+ ksort($config_data);
+
$mask = PhabricatorEnv::getEnvConfig('darkconsole.config-mask');
$mask = array_fill_keys($mask, true);
-
+
$rows = array();
- foreach ($data as $key => $value) {
+ foreach ($config_data as $key => $value) {
if (empty($mask[$key])) {
$display_value = is_array($value) ? json_encode($value) : $value;
$display_value = phutil_escape_html($display_value);
} else {
$display_value = phutil_escape_html('<Masked>');
}
$rows[] = array(
phutil_escape_html($key),
$display_value,
);
}
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
'Key',
'Value',
));
$table->setColumnClasses(
array(
'header',
'wide wrap',
));
- return $table->render();
+ return $lib_table->render().$table->render();
}
}
diff --git a/src/aphront/console/plugin/config/__init__.php b/src/aphront/console/plugin/config/__init__.php
index 3d244d156e..3a5d4625ac 100644
--- a/src/aphront/console/plugin/config/__init__.php
+++ b/src/aphront/console/plugin/config/__init__.php
@@ -1,16 +1,17 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'aphront/console/plugin/base');
phutil_require_module('phabricator', 'infrastructure/env');
phutil_require_module('phabricator', 'view/control/table');
phutil_require_module('phutil', 'markup');
+phutil_require_module('phutil', 'moduleutils');
phutil_require_source('DarkConsoleConfigPlugin.php');

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 18:05 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127250
Default Alt Text
(3 KB)

Event Timeline