1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

Tracy\Panel: table is sortable

This commit is contained in:
David Grudl
2020-10-14 22:22:20 +02:00
parent 34a1665915
commit 70d4246866

View File

@@ -131,7 +131,7 @@ class Panel implements Tracy\IBarPanel
[$connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime] = $backup; [$connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime] = $backup;
} }
$s .= '<tr><td>' . number_format($event->time * 1000, 3, '.', ''); $s .= '<tr><td data-order="' . $event->time . '">' . number_format($event->time * 1000, 3, '.', '');
if ($explain) { if ($explain) {
static $counter; static $counter;
$counter++; $counter++;
@@ -159,7 +159,7 @@ class Panel implements Tracy\IBarPanel
. ($totalTime === null ? '' : ', time: ' . number_format($totalTime * 1000, 1, '.', '') . 'ms') . ', ' . ($totalTime === null ? '' : ', time: ' . number_format($totalTime * 1000, 1, '.', '') . 'ms') . ', '
. htmlspecialchars($this->getConnectionName($singleConnection)) . '</h1> . htmlspecialchars($this->getConnectionName($singleConnection)) . '</h1>
<div class="tracy-inner tracy-DibiProfiler"> <div class="tracy-inner tracy-DibiProfiler">
<table> <table class="tracy-sortable">
<tr><th>Time&nbsp;ms</th><th>SQL Statement</th><th>Rows</th>' . (!$singleConnection ? '<th>Connection</th>' : '') . '</tr> <tr><th>Time&nbsp;ms</th><th>SQL Statement</th><th>Rows</th>' . (!$singleConnection ? '<th>Connection</th>' : '') . '</tr>
' . $s . ' ' . $s . '
</table> </table>