Skip to content

Commit

Permalink
polished Tracy bar panel
Browse files Browse the repository at this point in the history
  • Loading branch information
petrparolek committed Feb 1, 2025
1 parent 8e25685 commit bd26624
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/Tracy/templates/panel.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ use Tracy\Helpers;
/** @var array $dbParams */
/** @var array<array{sql: string, params: mixed[], types: mixed[], duration: float }> $queries */
?>
<style>
#tracy-debug td.tracy-dbal-sql {
background: white !important
}
<style>
#tracy-debug td.tracy-dbal-sql {
background: white !important
}

#tracy-debug .tracy-dbal-source {
color: #999 !important
}
#tracy-debug .tracy-dbal-source {
color: #999 !important
}

#tracy-debug .tracy-dbal tr table {
margin: 8px 0;
max-height: 150px;
overflow: auto
}
#tracy-debug .tracy-dbal tr table {
margin: 8px 0;
max-height: 150px;
overflow: auto
}

#tracy-debug .nettrine-dbal td > a.tracy-toggle::before {
content: 'source';
}
</style>
#tracy-debug .nettrine-dbal td > a.tracy-toggle::before {
content: 'source';
}
</style>

<?php if ($queriesNum === 0) { ?>
<h1>No queries</h1>
Expand All @@ -45,6 +45,7 @@ use Tracy\Helpers;
</h1>
<div class="tracy-inner nettrine-dbal">
<?php if ($queries !== []): ?>
<h2>Queries with params</h2>
<table class="tracy-sortable">
<tr>
<th>Time&nbsp;ms</th>
Expand Down Expand Up @@ -82,6 +83,7 @@ use Tracy\Helpers;
</table>
<?php endif; ?>
<?php if ($queries !== []): ?>
<h2>Plain queries</h2>
<table class="tracy-sortable">
<tr>
<th>Time&nbsp;ms</th>
Expand Down Expand Up @@ -112,7 +114,7 @@ use Tracy\Helpers;
</table>
<?php endif; ?>

<div style="margin-top: 2px;">
<div style="margin-top: 25px;">
<?= Dumper::toHtml($dbParams, [Dumper::COLLAPSE => true]); ?>
</div>
</div>
Expand Down

0 comments on commit bd26624

Please sign in to comment.