mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
Add activity tab
This commit is contained in:
parent
f68d81ff17
commit
2a78500fdf
12
bindata.go
12
bindata.go
File diff suppressed because one or more lines are too long
@ -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) {
|
||||
|
@ -17,7 +17,6 @@
|
||||
padding: 0px;
|
||||
height: 50px;
|
||||
display: block;
|
||||
width: 550px;
|
||||
}
|
||||
|
||||
#nav ul li {
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user