Add a new table to display connection information

This commit is contained in:
Dan Sosedoff 2014-10-31 22:15:56 -05:00
parent 291b681e61
commit 5a2c13e6c4
2 changed files with 27 additions and 5 deletions

View File

@ -20,6 +20,7 @@
<li id="table_indexes">Indexes</li> <li id="table_indexes">Indexes</li>
<li id="table_query" class="selected">SQL Query</li> <li id="table_query" class="selected">SQL Query</li>
<li id="table_history">History</li> <li id="table_history">History</li>
<li id="table_connection">Connection</li>
</ul> </ul>
</div> </div>
<div id="sidebar"> <div id="sidebar">

View File

@ -182,6 +182,26 @@ function showQueryPanel() {
$("#output").removeClass("full"); $("#output").removeClass("full");
} }
function showConnectionPanel() {
setCurrentTab("table_connection");
apiCall("get", "/info", {}, function(data) {
var rows = [];
for(key in data) {
rows.push([key, data[key]]);
}
buildTable({
columns: ["attribute", "value"],
rows: rows
});
$("#input").hide();
$("#output").addClass("full");
});
}
function runQuery() { function runQuery() {
setCurrentTab("table_query"); setCurrentTab("table_query");
@ -294,6 +314,7 @@ $(document).ready(function() {
$("#table_indexes").on("click", function() { showTableIndexes(); }); $("#table_indexes").on("click", function() { showTableIndexes(); });
$("#table_history").on("click", function() { showQueryHistory(); }); $("#table_history").on("click", function() { showQueryHistory(); });
$("#table_query").on("click", function() { showQueryPanel(); }); $("#table_query").on("click", function() { showQueryPanel(); });
$("#table_connection").on("click", function() { showConnectionPanel(); });
$("#run").on("click", function() { $("#run").on("click", function() {
runQuery(); runQuery();