Skip to content

Commit

Permalink
[WebProfilerBundle] Config panel
Browse files Browse the repository at this point in the history
Split the main Key / Value table in different sections.
Add a list of active bundles.
  • Loading branch information
vicb committed Mar 13, 2011
1 parent 1d8be2b commit 36d51d7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
Expand Up @@ -80,7 +80,7 @@ tr
table
{
width:100%;
margin:10px 0 60px;
margin:10px 0 30px;
}

table th
Expand Down Expand Up @@ -137,7 +137,7 @@ fieldset

#header
{
padding:30px 30px 20px 30px;
padding:30px 30px 20px;
}

#header h1
Expand Down Expand Up @@ -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;
Expand Down
Expand Up @@ -43,7 +43,7 @@
{% endblock %}

{% block panel %}
<h2>Configuration</h2>
<h2>Project Configuration</h2>
<table>
<tr>
<th>Key</th>
Expand All @@ -54,7 +54,7 @@
<td>{{ collector.symfonyversion }}</td>
</tr>
<tr>
<th>Application</th>
<th>Application name</th>
<td>{{ collector.appname }}</td>
</tr>
<tr>
Expand All @@ -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>
Expand All @@ -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 %}
Expand Up @@ -52,7 +52,13 @@ public function collect(Request $request, Response $response, \Exception $except
'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();
}

}

/**
Expand Down Expand Up @@ -165,6 +171,11 @@ public function hasAccelerator()
return $this->hasApc() || $this->hasEAccelerator() || $this->hasXCache();
}

public function getBundles()
{
return $this->data['bundles'];
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 36d51d7

Please sign in to comment.