mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Fixed broken sql log selecting in debug-panel (#95)
torrentpier/torrentpier#533
This commit is contained in:
parent
accc87da38
commit
ce0aefe713
@ -52,7 +52,7 @@ function get_sql_log_html ($db_obj, $log_name)
|
|||||||
$info = !empty($dbg['info']) ? $dbg['info'] .' ['. $dbg['src'] .']' : $dbg['src'];
|
$info = !empty($dbg['info']) ? $dbg['info'] .' ['. $dbg['src'] .']' : $dbg['src'];
|
||||||
|
|
||||||
$log .= ''
|
$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 style="letter-spacing: -1px;">'. $time .' </span>'
|
||||||
. '<span title="Copy to clipboard" onclick="$(\'#'. $id .'\').CopyToClipboard();" style="color: gray; letter-spacing: -1px;">'. $perc .'</span>'
|
. '<span title="Copy to clipboard" onclick="$(\'#'. $id .'\').CopyToClipboard();" style="color: gray; letter-spacing: -1px;">'. $perc .'</span>'
|
||||||
. ' '
|
. ' '
|
||||||
|
@ -29,15 +29,6 @@
|
|||||||
border-width: 0 0 1px 0;
|
border-width: 0 0 1px 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.sqlLogHead {
|
|
||||||
text-align: right;
|
|
||||||
float: right;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.sqlLogHead fieldset {
|
|
||||||
float: right;
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
.sqlLogWrapped {
|
.sqlLogWrapped {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
@ -56,7 +47,6 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!empty($_COOKIE['explain']))
|
if (!empty($_COOKIE['explain']))
|
||||||
{
|
{
|
||||||
foreach ($DBS->srv as $srv_name => $db_obj)
|
foreach ($DBS->srv as $srv_name => $db_obj)
|
||||||
@ -70,33 +60,16 @@ if (!empty($_COOKIE['explain']))
|
|||||||
|
|
||||||
$sql_log = !empty($_COOKIE['sql_log']) ? get_sql_log() : '';
|
$sql_log = !empty($_COOKIE['sql_log']) ? 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)
|
if ($sql_log)
|
||||||
{
|
{
|
||||||
echo '<div class="sqlLog" id="sqlLog">'. ($sql_log ? $sql_log : '') .'</div><!-- / sqlLog --><br clear="all" />';
|
echo '<div class="sqlLog" id="sqlLog">'. ($sql_log ? $sql_log : '') .'</div><!-- / sqlLog --><br clear="all" />';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function fixSqlLog() {
|
||||||
|
if ($("#sqlLog").height() > 400) {
|
||||||
|
$("#sqlLog").height(400);
|
||||||
|
}
|
||||||
|
}
|
||||||
$(document).ready(fixSqlLog);
|
$(document).ready(fixSqlLog);
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user