[WebProfilerBundle] Config panel

Split the main Key / Value table in different sections.
Add a list of active bundles.
This commit is contained in:
Victor Berchet 2011-03-13 16:25:16 +01:00
parent 1d8be2b112
commit 36d51d7bbd
3 changed files with 39 additions and 5 deletions

View File

@ -80,7 +80,7 @@ tr
table
{
width:100%;
margin:10px 0 60px;
margin:10px 0 30px;
}
table th
@ -137,7 +137,7 @@ fieldset
#header
{
padding:30px 30px 20px 30px;
padding:30px 30px 20px;
}
#header h1
@ -347,7 +347,7 @@ ul.alt li.error {
margin-bottom: 1px;
}
td#main, td.menu {
td.main, td.menu {
text-align: left;
margin: 0;
padding: 0;

View File

@ -43,7 +43,7 @@
{% endblock %}
{% block panel %}
<h2>Configuration</h2>
<h2>Project Configuration</h2>
<table>
<tr>
<th>Key</th>
@ -54,7 +54,7 @@
<td>{{ collector.symfonyversion }}</td>
</tr>
<tr>
<th>Application</th>
<th>Application name</th>
<td>{{ collector.appname }}</td>
</tr>
<tr>
@ -65,6 +65,14 @@
<th>Debug</th>
<td>{{ collector.debug ? 'enabled' : 'disabled' }}</td>
</tr>
</table>
<h2>PHP configuration</h2>
<table>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
<tr>
<th>PHP version</th>
<td>{{ collector.phpversion }}</td>
@ -90,4 +98,19 @@
<td>{{ collector.haseaccelerator ? 'enabled' : 'disabled' }}</td>
</tr>
</table>
<h2>Active bundles</h2>
<table>
<tr>
<th>Name</th>
<th>Path</th>
</tr>
{% for name, path in collector.bundles %}
<tr>
<th>{{ name }}</th>
<td>{{ path }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}

View File

@ -52,7 +52,13 @@ class ConfigDataCollector extends DataCollector
'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'),
'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'),
'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'),
'bundles' => array(),
);
foreach ($this->kernel->getBundles() as $name => $bundle) {
$this->data['bundles'][$name] = $bundle->getPath();
}
}
/**
@ -165,6 +171,11 @@ class ConfigDataCollector extends DataCollector
return $this->hasApc() || $this->hasEAccelerator() || $this->hasXCache();
}
public function getBundles()
{
return $this->data['bundles'];
}
/**
* {@inheritdoc}
*/