Permalink
Browse files

Minor UI improvements

  • Loading branch information...
1 parent 71079b1 commit a980c59b67302f7e131adf6a0aefa58cf42a5859 @maxromanovsky maxromanovsky committed Mar 21, 2013
Showing with 32 additions and 16 deletions.
  1. +28 −16 Resources/views/Collector/mysqlnd.html.twig
  2. +4 −0 composer.json
@@ -26,9 +26,17 @@
{% if collector.statistics %}
<table>
- {% for key, value in collector.statistics %}
- <tr><td>{{ key }}</td><td>{{ value }}</td></tr>
- {% endfor %}
+ <thead>
+ <tr>
+ <th scope="col">Key</th>
+ <th scope="col">Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in collector.statistics %}
+ <tr><th>{{ key }}</th><td>{{ value }}</td></tr>
+ {% endfor %}
+ </tbody>
</table>
<p>Documentation on the individual statistics can be found on <a href="http://php.net/mysqlnd.stats">http://php.net/mysqlnd.stats</a>.</p>
{% else %}
@@ -40,24 +48,28 @@
<div id="JSMysqlndQC">
<h2>mysqlnd_qc Query Tracing</h2>
-
+
{% if collector.MysqlndQCTrace %}
<table>
- <tr><td>No.</td><td>Run time</td><td>Store Time</td><td>Cachable</td></tr>
- {% for key, value in collector.MysqlndQCTrace %}
- <tr><td colspan="5"><strong>{{ value['query'] }}</strong></td></tr>
- <tr><td>#{{ key+1 }}</td>
- <td>{{ value['run_time'] }} ms</td>
- <td>{{ value['store_time'] }} ms</td>
- <td>{% if value['eligible_for_caching'] %}Cachable{% else %}Not cachable{% endif %}</td>
- <td><a href="#" onclick="document.getElementById('JSMysqlndQCStacktrace{{ key+1 }}').style.display='inline'; return false;">Stacktrace</a></td>
- </tr>
- <tr><td colspan="5" style="overflow: scroll"><pre id="JSMysqlndQCStacktrace{{ key+1 }}" style="display:none;">{{ value['origin'] }}</pre></td></tr>
- {% endfor %}
+ <thead>
+ <tr><th>No.</th><th>Run time</th><th>Store Time</th><th>Cachable</th></tr>
+ </thead>
+ <tbody>
+ {% for key, value in collector.MysqlndQCTrace %}
+ <tr><td colspan="5"><strong>{{ value['query'] }}</strong></td></tr>
+ <tr><th>#{{ key+1 }}</th>
+ <td>{{ value['run_time'] }} ms</td>
+ <td>{{ value['store_time'] }} ms</td>
+ <td>{% if value['eligible_for_caching'] %}Cachable{% else %}Not cachable{% endif %}</td>
+ <td><a href="#" onclick="document.getElementById('JSMysqlndQCStacktrace{{ key+1 }}').style.display='inline'; return false;">Stacktrace</a></td>
+ </tr>
+ <tr><td colspan="5" style="overflow: scroll"><pre id="JSMysqlndQCStacktrace{{ key+1 }}" style="display:none;">{{ value['origin'] }}</pre></td></tr>
+ {% endfor %}
+ </tbody>
</table>
{% else %}
<strong>No myslqnd_qc traces collected for this request.</strong>
<p>For collecting trace data PHP requires the <a href="http://php.net/mysqlnd_qc">mysqlnd_qc extension</a> and <i>mysqlnd_qc.collect_query_trace</i> has to be enabled in php.ini.</p>
{% endif %}
- </div>
+ </div>
{% endblock %}
View
@@ -11,6 +11,10 @@
"homepage": "http://schlueters.de"
},
{
+ "name": "Max Romanovsky",
+ "homepage": "http://maxromanovsky.com"
+ },
+ {
"name": "Symfony Community",
"homepage": "https://github.com/johannes/JSMysqlndBundle/contributors"
}

0 comments on commit a980c59

Please sign in to comment.