Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion media/plg_system_debug/css/debug.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,52 @@ div#system-debug {
#dbg_container_session pre .grey
{
color:grey;
}
}

#system-debug ul.debug-accordion div {
position: relative;
overflow: hidden;
max-height: 800px;
opacity: 1;
transform: translate(0, 0);
z-index: 2;
}

#system-debug ul.debug-accordion {
list-style: none;
perspective: 900;
padding: 0;
margin: 0;
}

#system-debug ul.debug-accordion li {
position: relative;
margin-bottom: 0.5rem;
}

#system-debug ul.debug-accordion li h3 {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: transparent;
border-bottom: 0 solid transparent;
color: #3073bb;
font-size: 0.9286rem;
font-weight: bold;
line-height: 1.2;
}

#system-debug ul.debug-accordion li input[type=checkbox] {
position: absolute;
cursor: pointer;
width: 100%;
height: 100%;
z-index: 1;
opacity: 0;
}

#system-debug ul.debug-accordion li input[type=checkbox]:checked ~ div {
margin-top: 0;
max-height: 0;
opacity: 0;
transform: translate(0, 50%);
}
2 changes: 1 addition & 1 deletion media/plg_system_debug/css/debug.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions plugins/system/debug/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -1071,29 +1071,29 @@ protected function displayQueries()

$htmlProfile = $info[$id]->profile ?: Text::_('PLG_DEBUG_NO_PROFILE');

$htmlAccordions = HTMLHelper::_(
'bootstrap.startAccordion', 'dbg_query_' . $id, array(
'active' => $info[$id]->hasWarnings ? ('dbg_query_explain_' . $id) : '',
)
);
// We are using a pure CSS accordion because of performance issues when a lot of queries are run
$htmlAccordions = '<ul class="debug-accordion" id="dbg_query_' . $id .'">';

$htmlAccordions .= HTMLHelper::_('bootstrap.addSlide', 'dbg_query_' . $id, Text::_('PLG_DEBUG_EXPLAIN'), 'dbg_query_explain_' . $id)
. $info[$id]->explain
. HTMLHelper::_('bootstrap.endSlide');
$htmlAccordions .= '<li id="dbg_query_explain_' . $id . '"><input type="checkbox" checked>'
. '<h3>' . Text::_('PLG_DEBUG_EXPLAIN') . '</h3>'
. '<div class="content">' . $info[$id]->explain . '</div>'
. '</li>';

$htmlAccordions .= HTMLHelper::_('bootstrap.addSlide', 'dbg_query_' . $id, $title, 'dbg_query_profile_' . $id)
. $htmlProfile
. HTMLHelper::_('bootstrap.endSlide');
$htmlAccordions .= '<li id="dbg_query_profile_' . $id . '"><input type="checkbox" checked>'
. '<h3>' . $title . '</h3>'
. '<div class="content">' . $htmlProfile . '</div>'
. '</li>';

// Call stack and back trace.
if (isset($callStacks[$id]))
{
$htmlAccordions .= HTMLHelper::_('bootstrap.addSlide', 'dbg_query_' . $id, Text::_('PLG_DEBUG_CALL_STACK'), 'dbg_query_callstack_' . $id)
. $this->renderCallStack($callStacks[$id])
. HTMLHelper::_('bootstrap.endSlide');
$htmlAccordions .= '<li id="dbg_query_callstack_' . $id . '"><input type="checkbox" checked>'
. '<h3>' . Text::_('PLG_DEBUG_CALL_STACK') . '</h3>'
. '<div class="content">' . $this->renderCallStack($callStacks[$id]) . '</div>'
. '</li>';
}

$htmlAccordions .= HTMLHelper::_('bootstrap.endAccordion');
$htmlAccordions .= '</ul>';

$did = md5($query);

Expand Down