summaryrefslogtreecommitdiffstats
path: root/ogcp/static
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-09-29 17:21:00 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-11-17 17:56:07 +0100
commit20935966efdae847023680217a4c109648698340 (patch)
treeb36281271b133a141a1666d6039e4695128b9f3c /ogcp/static
parentd029df8e842f8dce9d48f8ec9e11e336b0af46e9 (diff)
WIP Make scopes tree async
Diffstat (limited to 'ogcp/static')
-rw-r--r--ogcp/static/js/ogcp.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 61d828d..d267e5b 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -3,6 +3,18 @@ const macs = new Map();
const Interval = 1000;
let updateTimeoutId = null;
+async function buildScopesTree() {
+ const resp = await fetch('/ogservers');
+ const servers = await resp.json();
+ const scopes = document.getElementById("scopes")
+
+ for (const s of servers) {
+ const resp = await fetch('/scopes-tree?server=' + s);
+ const htmlText = await resp.text();
+ scopes.innerHTML += htmlText;
+ }
+}
+
async function show_client_mac(pill_id) {
const pill = $('#' +pill_id);
const ip = pill.html().split('<br>')[1]