summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/commands.html
Commit message (Collapse)AuthorAgeFilesLines
* templates: show client details at the end of the client optionsAlejandro Sirgo Rica2024-06-201-2/+2
| | | | | Move "Client details" to the last option of the "Client" dropdown in the Commands page.
* ogcp: add cache management pageAlejandro Sirgo Rica2024-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement cache management through cache/list and cache/delete API REST methods. The view corresponds to the URL action/cache and contains three main parts: - Free cache available in the client's bubbles. - Image selection form to request the deletion and view the client with that image in cache. - Cache details per client to see total, used and available cache. The main usecase for the view is the removal of cache to make room for new images in clients with slow connections. Checking clients where available cache space is not enough to hold the new image and then requesting removal of specific images. The html template receives the following structures from the view: storage_data[ip] = {'used': 223452345, 'total': 2345234523452} client_images[ip] = [f'{image_name}.{image_checksum}', ...] image_data[f'{image_name}.{image_checksum}'] = { clients: ['192.168.0.1', ...], size: 34534530850, name: image_name, }
* Open real time log in a new tabJavier Sánchez Parra2022-11-171-1/+1
|
* Add different selection mode for the tree viewDaniel García Moreno2022-09-271-1/+1
|
* Rearrange image dropdownJavier Sánchez Parra2022-04-081-4/+4
|
* Add Update image to commandsJavier Sánchez Parra2022-04-081-0/+2
| | | | | | | | Allows updating the image file for an existing image. This action is related to /image/create in ogServer API. If ogServer receives an POST /image/create without the parameter "description", it does not create a new image and only updates.
* Ask for reference when partitioning several clientsJavier Sánchez Parra2022-04-011-1/+1
| | | | | Allow the user to choose a computer as reference to display the partition scheme form.
* Add back button to all actionsJavier Sánchez Parra2022-03-141-0/+6
| | | | Add a back button to facilitate users to return to the previous page.
* Disable scopes tree's checkboxes in action viewsJavier Sánchez Parra2022-03-101-1/+1
| | | | | Now users can select clients only in scopes and command views, in any other view we set the scopes tree read only.
* Show selected clients in container blockJavier Sánchez Parra2022-02-231-0/+3
| | | | | | | | | | | | | | | | | | | On scopes and commands views, draw clients as users selects them in the scopes tree. Trigger client drawing on two events: 1."change" event, occurs when the user clicks a client checkbox. This event is standard [1]. 2. "show-client" event, fires when ogcp get selected clients from localStorage and when an user checks a parent checkbox. This event is custom. Dot characters (".") in clients names are replaced by underscore("_") when used as id to avoid errors. 1. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
* Rename "Log" action to "System Log"Jose M. Guisado2022-02-221-1/+1
|
* 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.