Skip to content

Commit

Permalink
add exec time of empty queries (#763)
Browse files Browse the repository at this point in the history
* add exec time of empty queries
* add { }
* fix space
* use proposed format
  • Loading branch information
Quake4 authored Nov 20, 2024
1 parent 08b1ea7 commit e6df3d1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ function buildTable(results, sortColumn, sortOrder, options) {
if (results.rows.length == 0) {
$("#results_header").html("");
$("#results_body").html("<tr><td>No records found</td></tr>");
$("#result-rows-count").html("");
if (results.stats) {
$("#result-rows-count").html(results.stats.query_duration_ms + " ms");
} else {
$("#result-rows-count").html("");
}
$("#results").addClass("empty");
return;
}
Expand All @@ -440,9 +444,8 @@ function buildTable(results, sortColumn, sortOrder, options) {

results.columns.forEach(function(col) {
if (col === sortColumn) {
cols += "<th class='table-header-col active' data-name='" + col + "'" + "data-order=" + sortOrder + ">" + col + "&nbsp;" + sortArrow(sortOrder) + "</th>";
}
else {
cols += "<th class='table-header-col active' data-name='" + col + "' data-order=" + sortOrder + ">" + col + "&nbsp;" + sortArrow(sortOrder) + "</th>";
} else {
cols += "<th class='table-header-col' data-name='" + col + "'>" + col + "</th>";
}
});
Expand Down

0 comments on commit e6df3d1

Please sign in to comment.