Fix debug queries console broken query time and group count
There was no number displayed, I fixed the jquery expression and then fixed the formatting method to make the value appear in each display case Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
a9356e4d16
commit
2365ec78e2
@ -1354,10 +1354,10 @@ var ConsoleDebug = {
|
|||||||
.data('queryInfo', queryInfo)
|
.data('queryInfo', queryInfo)
|
||||||
.data('totalTime', totalTime);
|
.data('totalTime', totalTime);
|
||||||
if (grouped) {
|
if (grouped) {
|
||||||
$query.find('.text.count').removeClass('hide');
|
$query.find('span.text.count').removeClass('hide');
|
||||||
$query.find('.text.count span').text(count);
|
$query.find('span.text.count span').text(count);
|
||||||
}
|
}
|
||||||
$query.find('.text.time span').text(queryTime + 's (' + ((queryTime * 100) / totalTime).toFixed(3) + '%)');
|
$query.find('span.text.time span').text(ConsoleDebug.getQueryTimeTaken(queryTime, totalTime));
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
},
|
},
|
||||||
@ -1369,6 +1369,9 @@ var ConsoleDebug = {
|
|||||||
}
|
}
|
||||||
$elem.append(this.formatBackTrace(query.trace));
|
$elem.append(this.formatBackTrace(query.trace));
|
||||||
},
|
},
|
||||||
|
getQueryTimeTaken: function (queryTime, totalTime) {
|
||||||
|
return queryTime + 's (' + ((queryTime * 100) / totalTime).toFixed(3) + '%)';
|
||||||
|
},
|
||||||
getQueryDetails: function (queryInfo, totalTime, $query) {
|
getQueryDetails: function (queryInfo, totalTime, $query) {
|
||||||
if (Array.isArray(queryInfo)) {
|
if (Array.isArray(queryInfo)) {
|
||||||
var $singleQuery;
|
var $singleQuery;
|
||||||
@ -1377,9 +1380,7 @@ var ConsoleDebug = {
|
|||||||
.text((parseInt(i) + 1) + '.')
|
.text((parseInt(i) + 1) + '.')
|
||||||
.append(
|
.append(
|
||||||
$('<span class="time">').text(
|
$('<span class="time">').text(
|
||||||
Messages.strConsoleDebugTimeTaken +
|
Messages.strConsoleDebugTimeTaken + ' ' + ConsoleDebug.getQueryTimeTaken(queryInfo[i].time, totalTime)
|
||||||
' ' + queryInfo[i].time + 's' +
|
|
||||||
' (' + ((queryInfo[i].time * 100) / totalTime).toFixed(3) + '%)'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
this.appendQueryExtraInfo(queryInfo[i], $singleQuery);
|
this.appendQueryExtraInfo(queryInfo[i], $singleQuery);
|
||||||
|
|||||||
@ -88,8 +88,8 @@
|
|||||||
['action expand', 'Expand'|trans],
|
['action expand', 'Expand'|trans],
|
||||||
['action dbg_show_trace', 'Show trace'|trans],
|
['action dbg_show_trace', 'Show trace'|trans],
|
||||||
['action dbg_hide_trace', 'Hide trace'|trans],
|
['action dbg_hide_trace', 'Hide trace'|trans],
|
||||||
['text count hide', 'Count'|trans],
|
{0: 'text count hide', 1: 'Count'|trans, 'extraSpan': ''},
|
||||||
['text time', 'Time taken'|trans]
|
{0: 'text time', 1: 'Time taken'|trans, 'extraSpan': ''},
|
||||||
]
|
]
|
||||||
} only %}
|
} only %}
|
||||||
</div> <!-- Template -->
|
</div> <!-- Template -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user