summaryrefslogtreecommitdiffstats
path: root/ogcp/forms
Commit message (Collapse)AuthorAgeFilesLines
...
* Add most common partition codes and filesystemsJavier Sánchez Parra2021-08-241-0/+16
| | | | To increase the compatibility of "Partition & format" (aka setup).
* Add "Delete center" actionJavier Sánchez Parra2021-07-301-0/+5
| | | | | | | | Creates "delete center" form with a select to choose a center to delete. Adds a new button in the scopes view. Because scopes checkboxes values maps to ips the only way to specify the center to delete is in the delete center form itself, using a select input.
* Add full scheme partitioning supportJavier Sánchez Parra2021-07-281-21/+11
| | | | | | | | | | 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/+6
| | | | | | | | 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-0/+16
| | | | | | | | | | | | | | | | | | | | | 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.
* ogcp is AGPLv3+OpenGnSys Support Team2021-05-202-0/+14
| | | | Update license header in files.
* Add "Delete Room" form and viewJavier Sánchez Parra2021-05-201-0/+5
| | | | | | | | 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/+9
| | | | | | | | | | | | | 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-241-0/+1
| | | | | | | | * 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
* Add loginJose M. Guisado2021-03-051-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Ogcp requires a simple login page in order to avoid exposure of the ogServer API to anyone trying to access the web page. Because the main authorization mechanism in ogServer is the api token the login implemented for the ogcp does not include registration process but a single user and password specified in the ogcp.json. "USER": "user", "PASS": "pass" Adds two new views: /login and /logout. They are used to login the user so that the rest of views regarding ogServer functionality can be accessed in a "login required" fashion. Index view (/) is an exception, it can be accessed logged in or not so different data can be displayed. Templates can now access a variable "current_user" to get information about login status. This is a Flask-Login feature. - Templates regarding login can be found in templates/auth/ - Login form is defined in forms/auth.py to separate it from action_forms.py - Adds Flask-Login module to requirements.txt - Adds default user and pass in ogcp.json
* Add boot mode to actionsJose M. Guisado2021-02-171-0/+5
| | | | | | 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 example image creation WTForms validatorJose M. Guisado2021-02-161-1/+3
| | | | | | | | | | | Adds in a declarative way the validation of the image name form control when creating a partition image. This commit serves as an example of adding a predefined validator of the WTForms module. Custom validator may be added by creating a given function and appending it to the list of validators. See https://wtforms.readthedocs.io/en/2.3.x/validators/#custom-validators
* Add UNICAST-DIRECT method to image restoreJose M. Guisado2021-02-101-1/+2
| | | | | | | | | | | | Previously the only method (in the form select) was "UNICAST". This patch enables specifying a correct parameter for the underlying script to fetch the image to be restored. UNICAST-DIRECT makes the administrator transfer the image through the network. UNICAST-CACHE indicates the taget pc to search for the image in its cache partition. Also redirects to the /scopes when ogserver responds with 200 OK.
* Add software actionJose M. Guisado2020-10-291-0/+6
| | | | | | | | This action lists every piece of software installed in an OS from a client. This action can handle listing the software from the DB as well as updating that DB with the latest client information.
* Add image create actionRoberto Hueso Gómez2020-10-291-0/+7
| | | | | This action handles the creation of the image in the DB as well as the '.img' file.
* Add image restore actionRoberto Hueso Gómez2020-10-231-0/+8
| | | | | This action provides the image restoring functionality on a specific client.
* Add session actionRoberto Hueso Gómez2020-10-221-1/+6
| | | | | This action provides the functionality to run one of the installed OSs in a client.
* Add client hardware actionRoberto Hueso Gómez2020-10-211-0/+4
| | | | This action lists all the hardware items in a client.
* Add client details actionRoberto Hueso Gómez2020-09-281-1/+24
| | | | | This action is used to visualize the specific details of a client, such as its IP, Name, MAC, etc.
* Add partitions setup formsRoberto Hueso Gómez2020-09-141-1/+20
| | | | | This provides a menu to setup the internal partitions setup of each machine. Delete partitions is still just a placeholder.
* Add WoL actionRoberto Hueso Gómez2020-09-041-0/+10
This action can be applied on one or multiple scopes. This implementation use Flask-WTF as a way to build and valdiate forms. As a side effect, this adds CSRF protection to all forms.