From 4e519590af6484cc05a91f102a0a3765408b5e72 Mon Sep 17 00:00:00 2001 From: Daniel GarcĂ­a Moreno Date: Wed, 7 Jul 2021 10:27:59 +0200 Subject: Update scopes tree dynamically This patch adds a javascript function to update the scope tree (on/off) state. This javacript function is called every second, does a call to the new backend endpoint `/scopes/status` and updates the tree classes depending on the current data. The new `/scopes/status` endpoint just returns the scopes tree as json. This patch also adds an icon in the tree leafs, a filled green circle when the state is `on`, and a empty red circle when the state is `off`. There's also a new javascript function to unfold all collapses in the scope tree. --- ogcp/templates/macros.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'ogcp/templates/macros.html') diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html index 60b26a7..93c7380 100644 --- a/ogcp/templates/macros.html +++ b/ogcp/templates/macros.html @@ -20,15 +20,28 @@ {% macro scopes_tree_collapse(scopes) -%} -