summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/macros.html
Commit message (Collapse)AuthorAgeFilesLines
* Update scopes tree dynamicallyDaniel García Moreno2021-07-071-2/+18
| | | | | | | | | | | | | | | | | 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.
* Add scopes_tree_collapse macroJose M. Guisado Gomez2021-06-301-0/+29
| | | | | | | | | | | | | Being able to collapse the scopes tree allows to fit a bigger scopes tree. A new macro is introduced to generate the HTML code for the scope tree in such a way that each non-leaf level (center, room) are collapsible. macros.scopes_tree_collapse(scopes) As of now, the state of the scope tree is not saved when changing nav sections.
* Keep the selection in the sidebar for mode & setupDaniel García Moreno2021-06-171-0/+1
|
* Add commands view and macros.htmlJose M. Guisado2021-06-171-0/+19
Commands view has a scope sidebar with the content block filled with command buttons (poweroff, wol, etc.) This commit leaves scope create/delete/update buttons in the /scopes view, which serves that purpose. To avoid duplicating scope tree creation macro, an external macros.html is created, this template can be imported. Future macros needed can be written in there.