Show number of rows rendered for custom sql query

This commit is contained in:
Dan Sosedoff 2017-02-25 14:04:48 -06:00
parent 7882abea35
commit 36fd4871e1
4 changed files with 20 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -212,6 +212,16 @@
border-bottom: solid 1px #ddd; border-bottom: solid 1px #ddd;
} }
#input .actions #result-rows-count {
font-size: 12px;
display: inline-block;
height: 30px;
line-height: 30px;
float: left;
margin-right: 10px;
color: #999;
}
#input .actions .btn { #input .actions .btn {
line-height: 30px; line-height: 30px;
height: 30px; height: 30px;

View File

@ -65,6 +65,7 @@
<input type="button" id="explain" value="Explain Query" class="btn btn-sm btn-default" /> <input type="button" id="explain" value="Explain Query" class="btn btn-sm btn-default" />
<div id="query_progress">Please wait, query is executing...</div> <div id="query_progress">Please wait, query is executing...</div>
<div class="pull-right"> <div class="pull-right">
<span id="result-rows-count"></span>
<input type="button" id="json" value="JSON" class="btn btn-sm btn-default" /> <input type="button" id="json" value="JSON" class="btn btn-sm btn-default" />
<input type="button" id="csv" value="CSV" class="btn btn-sm btn-default" /> <input type="button" id="csv" value="CSV" class="btn btn-sm btn-default" />
<input type="button" id="xml" value="XML" class="btn btn-sm btn-default" /> <input type="button" id="xml" value="XML" class="btn btn-sm btn-default" />

View File

@ -303,6 +303,9 @@ function buildTable(results, sortColumn, sortOrder, options) {
}); });
$("<thead>" + cols + "</thead><tbody>" + rows + "</tobdy>").appendTo("#results"); $("<thead>" + cols + "</thead><tbody>" + rows + "</tobdy>").appendTo("#results");
// Show number of rows rendered on the page
$("#result-rows-count").html(results.rows.length + " rows");
} }
function setCurrentTab(id) { function setCurrentTab(id) {