@@ -24,7 +24,7 @@ declare(strict_types=1);
2424 <th style="width: 1%">Rows</th>
2525 </tr>
2626
27- <?php foreach ($ queries as [$ connection , $ sql , $ params , $ source , $ time , $ rows , $ error , $ command , $ explain ]): ?> <tr>
27+ <?php foreach ($ queries as [$ connection , $ sql , $ params , $ trace , $ time , $ rows , $ error , $ command , $ explain ]): ?> <tr>
2828 <td style="background:rgba(255, 95, 23, <?= Tracy \Helpers::escapeHtml (sprintf ('%0.3f ' , log ($ time * 1000 + 1 , 10 ) * $ performanceScale )) ?>
2929)" data-order="<?= Tracy \Helpers::escapeHtml ((float ) $ time ) ?>
3030">
@@ -36,6 +36,9 @@ declare(strict_types=1);
3636<?php endif ?>
3737<?php if ($ explain ): ?>
3838 <br><a class="tracy-toggle tracy-collapsed" data-tracy-ref="^tr .nette-DbConnectionPanel-explain">explain</a>
39+ <?php endif ?>
40+ <?php if ($ trace ): ?>
41+ <br><a class="tracy-toggle tracy-collapsed" data-tracy-ref="^tr .nette-DbConnectionPanel-trace">trace</a>
3942<?php endif ?>
4043 </td>
4144
@@ -55,11 +58,19 @@ declare(strict_types=1);
5558<?php endforeach ?> </tr>
5659<?php endforeach ?> </table>
5760<?php endif ?>
58- <?php if ($ source ): ?>
59- <?= substr_replace (Tracy \Helpers::editorLink ($ source [0 ], $ source [1 ]), ' class="nette-DbConnectionPanel-source" ' , 2 , 0 ) ?>
61+ <?php if ($ trace ): ?> <?= substr_replace (Tracy \Helpers::editorLink ($ trace [0 ]['file ' ], $ trace [0 ]['line ' ]), ' class="nette-DbConnectionPanel-source" ' , 2 , 0 ) ?>
6062
61- <?php endif ?>
62- </td>
63+ <table class="tracy-collapsed nette-DbConnectionPanel-trace">
64+ <?php foreach ($ trace as $ row ): ?> <tr>
65+ <td><?= isset ($ row ['file ' ]) ? Tracy \Helpers::editorLink ($ row ['file ' ], $ row ['line ' ]) : '' ?>
66+ </td>
67+ <td><?= Tracy \Helpers::escapeHtml ($ row ['class ' ] ?? '' ) ?>
68+ <?= Tracy \Helpers::escapeHtml ($ row ['type ' ] ?? '' ) ?>
69+ <?= Tracy \Helpers::escapeHtml ($ row ['function ' ]) ?>
70+ ()</td>
71+ </tr>
72+ <?php endforeach ?> </table>
73+ <?php endif ?> </td>
6374
6475 <td><?= Tracy \Helpers::escapeHtml ($ rows ) ?>
6576</td>
0 commit comments