summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/commands.html
Commit message (Collapse)AuthorAgeFilesLines
* Group command buttons into dropdownsJose M. Guisado2022-02-221-26/+67
| | | | | | | | | | | | | | | | | | | | Group related actions in the "commands" section inside a dropdown button. Declutters the panel in which the buttons are displayed. Dropdown button jinja block name is used as prefix for the block names of inside buttons. For example, for the image dropwdown button: <button class="...{% block nav_image %}{% endblock %}..."> {{ _('Image') }} </button> Actions such as restore and create will show a jinja block inside class attr like: <input class="... dropdown-item{% block nav_image_restore %}{% endblock %}" ... <input class="... dropdown-item{% block nav_image_create %}{% endblock %}" ...
* Add nav blocks to commands templateJose M. Guisado2022-02-221-16/+16
| | | | | | | | | | | | | Adds empty jinja blocks for the class attribute of all action buttons. Child templates from command (actions) can set their nav button as active overriding the corresponding {% block %}. Currently, not all action templates extends the commands.html template. This is not a problem, as the blocks are just empty. This is a preparation for changes on each action template to extend commands.html template.
* Merge nav into base templateJose M. Guisado2022-02-221-1/+1
| | | | | | | | | | | | | | | | | {% block %} defined in nav template cannot be overriden by child templates from base. This is a limitation in jinja. Merge nav into base template so jinja blocks so no {% include %} is used and these blocks can be overriden by child templates (commands, images, dashboard...) Avoid using request.endpoint to determine active nav item, decoupling endpoint names from navigation. Instead use child templates to override jinja blocks. [1] https://stackoverflow.com/q/40537752 https://stackoverflow.com/a/40562662 https://github.com/pallets/jinja/issues/243
* Group log commands buttons into dropdownJose M. Guisado2022-01-311-4/+11
| | | | | Compacts Commands view with a single "Logs" dropdown button. Dropdown shows current log commands.
* Adds confirmation page to reboot clientsJavier Sánchez Parra2022-01-201-1/+1
| | | | | | | | | | This commit adds an extra view to ensure users do not reboot clients accidentally. ogcp GET /reboot returns the confirmation page and POST /reboot builds and sends the request to ogServer. It also includes Spanish translation of the new strings.
* Adds confirmation page to power off clientsJavier Sánchez Parra2022-01-201-1/+1
| | | | | | | | | | This commit adds an extra view to ensure users do not power off clients accidentally. ogcp GET /poweroff returns the confirmation page and POST /poweroff builds and sends the request to ogServer. It also includes Spanish translation of the new strings.
* Add set ogLive to commandsJavier Sánchez Parra2021-12-161-0/+2
| | | | | | This action is related to /oglive in ogServer's API. Allows changing the ogLive for a set of given clients, previously selected in the /commands view.
* Add legacy real-time logJavier Sánchez Parra2021-11-081-0/+2
| | | | | | | | Clients in ogLive offer a web page with lighttpd that shows a real-time log. This commit links this log in ogcp. Future patches will deprecate this log functionality in favour of more robust solutions.
* Add legacy logJavier Sánchez Parra2021-10-281-0/+2
| | | | | Future patches will deprecate this log functionality in favour of more robust solutions.
* Add scopes_tree_collapse macroJose M. Guisado Gomez2021-06-301-1/+1
| | | | | | | | | | | | | 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.
* Add commands view and macros.htmlJose M. Guisado2021-06-171-0/+44
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.