diff --git a/static/js/app.js b/static/js/app.js index 50e3fb51..e71dd533 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -430,7 +430,11 @@ function buildTable(results, sortColumn, sortOrder, options) { if (results.rows.length == 0) { $("#results_header").html(""); $("#results_body").html("No records found"); - $("#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 += "" + col + " " + sortArrow(sortOrder) + ""; - } - else { + cols += "" + col + " " + sortArrow(sortOrder) + ""; + } else { cols += "" + col + ""; } });