2
0

template.html.twig 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {% extends '@WebProfiler/Profiler/layout.html.twig' %}
  2. {% block toolbar %}
  3. {% set icon %}
  4. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file-type-sql"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75" /><path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" /><path d="M18 15v6h2" /><path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z" /><path d="M14 20l1.5 1.5" /></svg>
  5. <span class="sf-toolbar-value">{{ collector.queryCount }}</span>
  6. {% endset %}
  7. {% set text %}
  8. <div class="sf-toolbar-info-piece">
  9. <b>Queries</b>
  10. <span>{{ collector.queryCount }}</span>
  11. </div>
  12. <div class="sf-toolbar-info-piece">
  13. <b>Total time</b>
  14. <span>{{ '%0.3f'|format(collector.totalTime) }} s</span>
  15. </div>
  16. {% endset %}
  17. {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
  18. {% endblock %}
  19. {% block menu %}
  20. <span class="label">
  21. <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file-type-sql"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75" /><path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" /><path d="M18 15v6h2" /><path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z" /><path d="M14 20l1.5 1.5" /></svg>
  22. </span>
  23. <strong>PaperORM</strong>
  24. </span>
  25. {% endblock %}
  26. {% block panel %}
  27. <h2>PaperORM Queries</h2>
  28. <p>
  29. <strong>{{ collector.queryCount }}</strong> queries executed
  30. in <strong>{{ '%0.3f'|format(collector.totalTime) }} s</strong>
  31. </p>
  32. <table class="alt">
  33. <thead>
  34. <tr>
  35. <th>#</th>
  36. <th>SQL</th>
  37. <th>Time (s)</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. {% for query in collector.queries %}
  42. <tr>
  43. <td>{{ loop.index }}</td>
  44. <td><code>{{ query.query }}<code</td>
  45. <td>{{ '%0.3f'|format(query.executionTime) }}</td>
  46. </tr>
  47. {% else %}
  48. <tr><td colspan="3"><em>No queries logged</em></td></tr>
  49. {% endfor %}
  50. </tbody>
  51. </table>
  52. {% endblock %}