db connection stats
This commit is contained in:
@@ -117,6 +117,19 @@ function getStats(order) {
|
|||||||
).then(resp => {
|
).then(resp => {
|
||||||
let t = document.getElementById("tstat_body")
|
let t = document.getElementById("tstat_body")
|
||||||
t.innerHTML = ""
|
t.innerHTML = ""
|
||||||
|
let c = document.getElementById("tconnstat_body")
|
||||||
|
c.innerHTML = ""
|
||||||
|
|
||||||
|
resp.db_connection_stats.forEach(v => {
|
||||||
|
let row = document.createElement("tr")
|
||||||
|
row.innerHTML = `\
|
||||||
|
<td>${v.name}</td>
|
||||||
|
<td>${v.max_connections}</td>
|
||||||
|
<td>${v.open_connections}</td>
|
||||||
|
<td>${v.connections_in_use}</td>
|
||||||
|
<td>${v.connections_idle}</td>`
|
||||||
|
c.appendChild(row)
|
||||||
|
})
|
||||||
|
|
||||||
resp.query_statistics.sort((a, b) => {
|
resp.query_statistics.sort((a, b) => {
|
||||||
if (typeof(a[order]) === "number") {
|
if (typeof(a[order]) === "number") {
|
||||||
|
@@ -55,7 +55,7 @@ FileManager.prototype.getUserFiles = function() {
|
|||||||
this.setSpinner()
|
this.setSpinner()
|
||||||
|
|
||||||
let getAll = (page) => {
|
let getAll = (page) => {
|
||||||
let numFiles = 10000
|
let numFiles = 1000
|
||||||
fetch(apiEndpoint+"/user/files?page="+page+"&limit="+numFiles).then(resp => {
|
fetch(apiEndpoint+"/user/files?page="+page+"&limit="+numFiles).then(resp => {
|
||||||
if (!resp.ok) { Promise.reject("yo") }
|
if (!resp.ok) { Promise.reject("yo") }
|
||||||
return resp.json()
|
return resp.json()
|
||||||
|
@@ -27,6 +27,19 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
<div class="limit_width">
|
<div class="limit_width">
|
||||||
<a href="/admin/globals">Update global settings</a>
|
<a href="/admin/globals">Update global settings</a>
|
||||||
|
<h3>Database connection statistics</h3>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>Name</td>
|
||||||
|
<td>Max</td>
|
||||||
|
<td>Open</td>
|
||||||
|
<td>In use</td>
|
||||||
|
<td>Idle</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tconnstat_body"></tbody>
|
||||||
|
</table>
|
||||||
<h3>Query statistics</h3>
|
<h3>Query statistics</h3>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
Reference in New Issue
Block a user