db connection stats

This commit is contained in:
2020-06-01 14:39:22 +02:00
parent f3b4c8b477
commit 98503a385b
3 changed files with 27 additions and 1 deletions

View File

@@ -117,6 +117,19 @@ function getStats(order) {
).then(resp => {
let t = document.getElementById("tstat_body")
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) => {
if (typeof(a[order]) === "number") {