Add activity tab

This commit is contained in:
Dan Sosedoff 2015-03-21 19:14:11 -05:00
parent f68d81ff17
commit 2a78500fdf
5 changed files with 19 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -129,7 +129,7 @@ func (client *Client) TableIndexes(table string) (*Result, error) {
// Returns all active queriers on the server
func (client *Client) Activity() (*Result, error) {
return client.Query(PG_ACTIVITY)
return client.query(PG_ACTIVITY)
}
func (client *Client) Query(query string) (*Result, error) {

View File

@ -17,7 +17,6 @@
padding: 0px;
height: 50px;
display: block;
width: 550px;
}
#nav ul li {

View File

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

View File

@ -221,6 +221,16 @@ function showConnectionPanel() {
});
}
function showActivityPanel() {
setCurrentTab("table_activity");
apiCall("get", "/activity", {}, function(data) {
buildTable(data);
$("#input").hide();
$("#output").addClass("full");
});
}
function runQuery() {
setCurrentTab("table_query");
@ -404,6 +414,7 @@ $(document).ready(function() {
$("#table_history").on("click", function() { showQueryHistory(); });
$("#table_query").on("click", function() { showQueryPanel(); });
$("#table_connection").on("click", function() { showConnectionPanel(); });
$("#table_activity").on("click", function() { showActivityPanel(); });
$("#run").on("click", function() {
runQuery();