diff options
author | William Desportes <williamdes@wdes.fr> | 2022-08-15 13:28:14 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2022-08-15 13:47:04 +0300 |
commit | 2365ec78e2eff6af28e8118706554427e6610076 (patch) | |
tree | 226c1e7d307abc5adba54ba009963a87ce49903d /js | |
parent | a9356e4d16579103292a0ec03ffb39373ffaafe8 (diff) |
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>
Diffstat (limited to 'js')
-rw-r--r-- | js/src/console.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/src/console.js b/js/src/console.js index f67b0f5b88..4e1c4d725f 100644 --- a/js/src/console.js +++ b/js/src/console.js @@ -1354,10 +1354,10 @@ var ConsoleDebug = { .data('queryInfo', queryInfo) .data('totalTime', totalTime); if (grouped) { - $query.find('.text.count').removeClass('hide'); - $query.find('.text.count span').text(count); + $query.find('span.text.count').removeClass('hide'); + $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; }, @@ -1369,6 +1369,9 @@ var ConsoleDebug = { } $elem.append(this.formatBackTrace(query.trace)); }, + getQueryTimeTaken: function (queryTime, totalTime) { + return queryTime + 's (' + ((queryTime * 100) / totalTime).toFixed(3) + '%)'; + }, getQueryDetails: function (queryInfo, totalTime, $query) { if (Array.isArray(queryInfo)) { var $singleQuery; @@ -1377,9 +1380,7 @@ var ConsoleDebug = { .text((parseInt(i) + 1) + '.') .append( $('<span class="time">').text( - Messages.strConsoleDebugTimeTaken + - ' ' + queryInfo[i].time + 's' + - ' (' + ((queryInfo[i].time * 100) / totalTime).toFixed(3) + '%)' + Messages.strConsoleDebugTimeTaken + ' ' + ConsoleDebug.getQueryTimeTaken(queryInfo[i].time, totalTime) ) ); this.appendQueryExtraInfo(queryInfo[i], $singleQuery); |