summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions
Commit message (Collapse)AuthorAgeFilesLines
* Add import clients actionJavier Sánchez Parra2022-04-191-0/+19
| | | | | | | | | | | Add import clients form with required inputs: room and dhcpd.conf. This permits users to rapidly add large amounts of clients to a room using dhcpd.conf's syntax. Users can copy full dhcpd.conf files to the text area and the parser only matches lines with the following format as clients: host dummy {hardware ethernet 12:34:56:78:90:ab; fixed-address 192.168.1.55; }
* Add Update image to commandsJavier Sánchez Parra2022-04-081-0/+22
| | | | | | | | 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.
* Submit disk form on change of dropdown listJavier Sánchez Parra2022-04-041-5/+1
| | | | Also remove send button as it not necessary anymore.
* Add form for disk selectionJavier Sánchez Parra2022-04-041-2/+7
| | | | | | | | | | Disk selection uses "scopesForm" to submit the change, but setup/show view receives new parameters not provided by this form. Commit 17757baa4727 adds those parameters. This commit gives disk selection its own form with all the required parameters.
* Move setup's disk selectorJavier Sánchez Parra2022-04-041-11/+13
| | | | | Move disk selector from the bottom of the page to the first table, nearby "Partition Table Type" and "Total Disk Size".
* Ask for reference when partitioning several clientsJavier Sánchez Parra2022-04-011-0/+26
| | | | | Allow the user to choose a computer as reference to display the partition scheme form.
* Add missing gettext functionsJavier Sánchez Parra2022-03-227-17/+27
| | | | Otherwise, this strings are not translatable.
* Add back button to all actionsJavier Sánchez Parra2022-03-1420-0/+21
| | | | 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-1019-0/+38
| | | | | Now users can select clients only in scopes and command views, in any other view we set the scopes tree read only.
* Remove "form" from scopes views' headingsJavier Sánchez Parra2022-03-094-4/+4
|
* Set scopes nav buttons as activeJavier Sánchez Parra2022-03-076-0/+11
| | | | When loading any scopes view, its nav button becomes active.
* Set commands nav buttons as activeJavier Sánchez Parra2022-03-0410-0/+20
| | | | When loading any command view, its nav button becomes active.
* Extend images html in "image details" templateJavier Sánchez Parra2022-03-031-1/+1
| | | | Otherwise, "image details" page lose the images tree and buttons.
* Extend scopes htmlJavier Sánchez Parra2022-03-034-4/+4
| | | | | Otherwise, this actions pages lose the scopes tree and the scopes buttons.
* Extend scopes or commands in client detailsJavier Sánchez Parra2022-03-031-1/+1
| | | | | | Both "Add client" and "Client details" views use client_details.html template. With this commit, "Add client" extends scopes.html and "Client details" extend commands.hmlt.
* Use pill style in confirmation pagesJavier Sánchez Parra2022-03-038-8/+8
| | | | | Draw selected clients from confirmation pages like selected clients from scopes and commands pages.
* Add clients info to session's confirmation pageJavier Sánchez Parra2022-03-031-1/+7
| | | | Show the number of clients and their IPs.
* Extend commands htmlJavier Sánchez Parra2022-03-026-6/+6
| | | | | Otherwise, this actions pages lose the scopes tree and the commands buttons.
* Refactor selected clients drawing in commandsJavier Sánchez Parra2022-02-247-35/+14
| | | | Refactor duplicated code as a jinja macro.
* Remove unused code in image creation templateJavier Sánchez Parra2022-02-241-6/+0
| | | | | Remove code to draw selected clients. Image creation template do not use it because only operates one client.
* Improve software inventory commandJose M. Guisado2022-02-232-1/+32
| | | | | | | | | | | | | | | | Extend commands.html template to keep scope tree, and action buttons state. When in the software inventory view, there exists two options: 'update' or 'view'. Do not print raw json response from ogserver about the software inventory/profile. When vieweing the software list, print a html table using the new template: software_list.html. Do not print blank pages with plain text html error codes when something goes wrong. Instead, print an error message after redirecting to the commands view.
* Move 'Update' button up in hardware viewJose M. Guisado2022-02-231-5/+7
|
* Hardware inventory template extends from command.htmlJose M. Guisado2022-02-221-1/+3
| | | | | | | | Extending from command.html is required for action views to mantain the scope context on the left side column. Enables setting dropdown button and action button as active when loading the hardware inventory view.
* Group command buttons into dropdownsJose M. Guisado2022-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | 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 %}" ...
* Setup view sets nav button as activeJose M. Guisado2022-02-221-0/+1
| | | | When loading the setup view, it's nav button becomes active.
* Add confirmation page when deleting imageJose M. Guisado2022-01-271-0/+20
| | | | | | | | User can confirm when deleting an image by double checking the information displayed on this page. Adds a new optional field in GenericForm: 'ids'. Used when dealing with ids instead of ips.
* Adds confirmation page to reboot clientsJavier Sánchez Parra2022-01-201-0/+25
| | | | | | | | | | 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-0/+25
| | | | | | | | | | 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.
* Rename to "Partition Table Type"Javier Sánchez Parra2022-01-201-1/+1
| | | | Otherwise, "Partition Table" is ambiguous.
* Show disk and partition size in mebibytesJavier Sánchez Parra2022-01-192-4/+4
| | | | | | | | | This commit converts disk and partition size from kibibytes to mebibytes to improve usability. Disk and partition size are used in "Client details" and "Partition & format" forms. It also returns size to kibibytes when creating /setup API payload as required by ogServer.
* Ask twice to delete clientsJavier Sánchez Parra2022-01-191-0/+25
| | | | | | | This commit adds an extra view to ensure users do not clients accidentally. It also includes Spanish translation of the new strings.
* Add set ogLive to commandsJavier Sánchez Parra2021-12-161-0/+22
| | | | | | 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.
* Support partition of computers with several disksJavier Sánchez Parra2021-11-021-0/+11
| | | | | | | | | Add a new select input and button to choose which disk you want to partition. TODO: Current argument parsing function returns a list with all the arguments, except csrf_token. Future patches should add granular parsing of different types of arguments.
* Add legacy logJavier Sánchez Parra2021-10-281-0/+10
| | | | | Future patches will deprecate this log functionality in favour of more robust solutions.
* Add partitions info to client detailsJavier Sánchez Parra2021-10-131-0/+24
| | | | Show a table with client's disks and partitions information.
* Add image details actionJavier Sánchez Parra2021-09-031-0/+13
| | | | | This action is used to visualize the specific details of an image, as its ID, name, size, etc.
* Add missing file from commit 9d98cf0Javier Sánchez Parra2021-08-231-0/+15
|
* Add full scheme partitioning supportJavier Sánchez Parra2021-07-281-70/+52
| | | | | | | | | | The initial "Partition & Format" (aka setup) form only allows to modify one partition at a time. This commit updates it to allow to modify the whole disk partition schema in one go, without pop-ups and transitions. This is a remake of the previous form using FieldList de WTForms and javascript to duplicate / remove FieldList adapted to the attributes available in WTForms.
* Create "Add Center" form and viewJavier Sánchez Parra2021-06-301-0/+15
| | | | | | | | Creates "add center" form with "name" as required input and "comment" as optional input. In the future, the CenterForm can be used to display center information once such functionality lands in the ogserver.
* Add new partition button in setup actionDaniel García Moreno2021-06-301-9/+72
| | | | | | | | | | | | | | | | | | | | | This patch adds a way to add a new partition to the setup.html template. This button opens a modal dialog with a new form and calls a new endpoint to create the new partition (this endpoint does nothing, it's needed to be implemented in the future). I've followed the initial design for this template, with one form per each partition, so every button will call a function and reload the page. It's possible to do all actions at once, but that will require a rework of this, to do that we can just define an unique form in the whole html, remove all the "Modify" buttons and add just one "Apply" button at the end. But maybe that option is a lot complex in the backend because will require to validate all the changes at once. This patch also improves the setup.html form without using flask-bootstrap and rendering the form in the template directly with the bootstrap4 classes.
* Keep the selection in the sidebar for mode & setupDaniel García Moreno2021-06-172-2/+2
|
* Add sidebar and command bar to base templateDaniel García Moreno2021-06-081-2/+1
| | | | | | | | | | | | | Modify the base template to add the sidebar and command bar, implemented just in the scopes view. This patch also modifies the "actions/mode.html" template to be shown in the scopes page. Any other action that should be inside the scopes should do the same, add the scopes and clients to the template context and use the "scopes.html" as base in those actions. The notification has been also changed to use a toast notification instead of the usual alert to avoid changing the layout on error.
* Add "Delete Room" form and viewJavier Sánchez Parra2021-05-201-0/+15
| | | | | | | | Creates "delete room" form with a select to choose a room to delete. Adds a new button inside the button group in the scopes view. Because scopes checkboxes values maps to ips the only way to specify the room to delete is in the delete room form itself, using a select input.
* Create "Add Room" form and viewJose M. Guisado2021-05-201-0/+15
| | | | | | | | | | | | | Creates "add room" form with required inputs only: center, name and netmask. Adds a new button inside the button group in the scopes view. Because scopes checkboxes values maps to ips the only way to specify the center in which to add the room is in the add room form itself, using a select input. In the future, the RoomForm can be used to display room information once such functionality lands in the ogserver.
* Add cosmetic improvementsJose M. Guisado2021-03-249-6/+62
| | | | | | | | * Adds label for each action page. * Adds a colored state for opengnsys connected clients * Fix nav active item * Rename some actions * Adds DISK to partition and format form
* Make partition forms inline in setup/Jose M. Guisado2021-03-051-0/+4
| | | | | | | | quick_form macro from Flask-Bootstrap creates vertical forms by default, this rendered each partition spanning too much vertical space. Use form_type='inline' from quick_form macro to compact the whole setup form.
* Cosmetic enhacementsJose M. Guisado2021-03-051-1/+3
| | | | | | * Use validate_ips and flashed messages for some more actions. * Use extra_classes in quick_form macro to add bootstrap classes to rendered forms
* Add boot mode to actionsJose M. Guisado2021-02-171-0/+13
| | | | | | This action is related to /mode in ogServer API. Allows changing the netboot template for a set of given clients, previously selected in the /scopes view.
* Add some minor cosmetic changesJose M. Guisado2021-02-161-1/+2
| | | | | | | | | | | | This commit may serve for future reference as to how some cosmetic changes have been applied to the web. Primarily using bootstrap classes in order to adjust margin or padding, there are mechanisms that allow modifying the class of an underlying html element in WTForms. Bootstrap classes are written directly in html templates for Flask. Also add a Soleta branded footer.
* Add image create templateJose M. Guisado2021-02-101-0/+11
| | | | | | | | Image creation action was lacking a template to render the form. This patch adds said template. Also redirects to /scopes when the request was processed by the ogserver successfully.