mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Merge pull request #533 from torrentpier/fixed-broken-sql-log-selecting
Fixed broken sql log selecting in debug-panel
This commit is contained in:
commit
9a71c20121
2 changed files with 8 additions and 35 deletions
|
@ -42,17 +42,6 @@ if (!defined('BB_ROOT')) {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sqlLogHead {
|
||||
text-align: right;
|
||||
float: right;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sqlLogHead fieldset {
|
||||
float: right;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.sqlLogWrapped {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
|
@ -74,7 +63,6 @@ if (!defined('BB_ROOT')) {
|
|||
</style>
|
||||
|
||||
<?php
|
||||
|
||||
if (!empty($_COOKIE['explain'])) {
|
||||
foreach ($DBS->srv as $srv_name => $db_obj) {
|
||||
if (!empty($db_obj->do_explain)) {
|
||||
|
@ -85,32 +73,17 @@ if (!empty($_COOKIE['explain'])) {
|
|||
|
||||
$sql_log = !empty($_COOKIE['sql_log']) ? \TorrentPier\Legacy\Dev::get_sql_log() : '';
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
function fixSqlLog() {
|
||||
if ($("#sqlLog").height() > 400) {
|
||||
$("#sqlLog").height(400);
|
||||
}
|
||||
$("#sqlLog div.sqlLogRow")
|
||||
.hover(
|
||||
function(){ $(this).addClass("sqlHover"); },
|
||||
function(){ $(this).removeClass("sqlHover"); }
|
||||
)
|
||||
.click(
|
||||
function(){ $(this).toggleClass("sqlHighlight"); }
|
||||
)
|
||||
;
|
||||
}
|
||||
</script>
|
||||
<div class="sqlLogHead">
|
||||
';
|
||||
|
||||
echo '</div><!-- / sqlLogHead -->';
|
||||
|
||||
if ($sql_log) {
|
||||
echo '<div class="sqlLog" id="sqlLog">' . ($sql_log ?: '') . '</div><!-- / sqlLog --><br clear="all" />';
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fixSqlLog() {
|
||||
if ($("#sqlLog").height() > 400) {
|
||||
$("#sqlLog").height(400);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(fixSqlLog);
|
||||
</script>
|
||||
|
|
|
@ -67,7 +67,7 @@ class Dev
|
|||
$info = !empty($dbg['info']) ? $dbg['info'] . ' [' . $dbg['src'] . ']' : $dbg['src'];
|
||||
|
||||
$log .= ''
|
||||
. '<div class="sqlLogRow" title="' . $info . '">'
|
||||
. '<div onmouseout="$(this).removeClass(\'sqlHover\');" onmouseover="$(this).addClass(\'sqlHover\');" onclick="$(this).toggleClass(\'sqlHighlight\');" class="sqlLogRow" title="' . $info . '">'
|
||||
. '<span style="letter-spacing: -1px;">' . $time . ' </span>'
|
||||
. '<span title="Copy to clipboard" onclick="$.copyToClipboard( $(\'#' . $id . '\').text() );" style="color: gray; letter-spacing: -1px;">' . $perc . '</span>'
|
||||
. ' '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue