diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-09-29 17:21:00 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-11-17 17:56:07 +0100 |
commit | 20935966efdae847023680217a4c109648698340 (patch) | |
tree | b36281271b133a141a1666d6039e4695128b9f3c /ogcp/static | |
parent | d029df8e842f8dce9d48f8ec9e11e336b0af46e9 (diff) |
WIP Make scopes tree async
Diffstat (limited to 'ogcp/static')
-rw-r--r-- | ogcp/static/js/ogcp.js | 12 |
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] |