Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot]
2004514ac6
Merge 5e1c76629b into e6df3d19fa 2024-11-22 22:43:46 +08:00
Oleg Samsonov
e6df3d19fa
add exec time of empty queries (#763)
Some checks failed
checks / tests (10) (push) Has been cancelled
checks / tests (11) (push) Has been cancelled
checks / tests (12) (push) Has been cancelled
checks / tests (13) (push) Has been cancelled
checks / tests (14) (push) Has been cancelled
checks / tests (15) (push) Has been cancelled
checks / tests (16) (push) Has been cancelled
checks / tests (17) (push) Has been cancelled
checks / tests (9.6) (push) Has been cancelled
checks / tests-windows (push) Has been cancelled
checks / lint (push) Has been cancelled
checks / fmt (push) Has been cancelled
demo deploy / Deploy to Fly (push) Has been cancelled
docker / docker images (push) Has been cancelled
* add exec time of empty queries
* add { }
* fix space
* use proposed format
2024-11-19 21:55:44 -08:00

View File

@ -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;
}
@ -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>";
}
});