Better looking query debug
This commit is contained in:
parent
40e70c4305
commit
b8e37a234a
1 changed files with 6 additions and 3 deletions
|
@ -108,14 +108,17 @@
|
||||||
<div class="main-wrapper">
|
<div class="main-wrapper">
|
||||||
<span>Load: <?php echo sprintf('%.05f', microtime(true) - $this->context->startTime) ?>s</span>
|
<span>Load: <?php echo sprintf('%.05f', microtime(true) - $this->context->startTime) ?>s</span>
|
||||||
<span>Queries: <?php echo count(queryLogger()->getLogs()) ?></span>
|
<span>Queries: <?php echo count(queryLogger()->getLogs()) ?></span>
|
||||||
<?php if ($this->config->misc->debugQueries): ?>
|
|
||||||
<pre class="debug"><?php echo join('<br>', array_map(function($x) { return preg_replace('/\s+/', ' ', $x); }, queryLogger()->getLogs())) ?></pre>
|
|
||||||
<?php endif ?>
|
|
||||||
<span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span>
|
<span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span>
|
||||||
<?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?>
|
<?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?>
|
||||||
<span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
|
<span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($this->config->misc->debugQueries): ?>
|
||||||
|
<hr>
|
||||||
|
<div class="main-wrapper">
|
||||||
|
<pre class="debug"><?php echo join('<br>', array_map(function($x) { return preg_replace('/\s+/', ' ', $x); }, queryLogger()->getLogs())) ?></pre>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<?php foreach (array_unique($this->context->scripts) as $name): ?>
|
<?php foreach (array_unique($this->context->scripts) as $name): ?>
|
||||||
|
|
Loading…
Reference in a new issue