Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/src/console.js13
-rw-r--r--templates/console/display.twig4
2 files changed, 9 insertions, 8 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);
diff --git a/templates/console/display.twig b/templates/console/display.twig
index 13095bfe8c..d7cb6bb7b8 100644
--- a/templates/console/display.twig
+++ b/templates/console/display.twig
@@ -88,8 +88,8 @@
['action expand', 'Expand'|trans],
['action dbg_show_trace', 'Show trace'|trans],
['action dbg_hide_trace', 'Hide trace'|trans],
- ['text count hide', 'Count'|trans],
- ['text time', 'Time taken'|trans]
+ {0: 'text count hide', 1: 'Count'|trans, 'extraSpan': ''},
+ {0: 'text time', 1: 'Time taken'|trans, 'extraSpan': ''},
]
} only %}
</div> <!-- Template -->