summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
Commit message (Collapse)AuthorAgeFilesLines
* config: use from_json to read ogserver configJose M. Guisado2020-11-061-1/+0
| | | | | | | | | | | | | | | This patch introduces the usage of Flask.Config class so the config can be read at startup (__init__) only once. Config keys must be uppercase so that from_json method does take it into account. dormousehole.readthedocs.io/en/stable/api.html#flask.Config.from_json Prior to this patch each request required opening and closing the ogserver.json file via load_config in views.py. In the future the decorated load_config function inside views.py may be removed to avoid creating multiple instances of the OGServer class.
* Add software actionJose M. Guisado2020-10-291-1/+39
| | | | | | | | 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-1/+43
| | | | | 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-1/+56
| | | | | This action provides the image restoring functionality on a specific client.
* Add session actionRoberto Hueso Gómez2020-10-221-1/+24
| | | | | This action provides the functionality to run one of the installed OSs in a client.
* Add client hardware actionRoberto Hueso Gómez2020-10-211-1/+20
| | | | This action lists all the hardware items in a client.
* Add create client actionRoberto Hueso Gómez2020-09-281-0/+35
| | | | | This action provides the functionality to add a new client to an ogServer.
* Add client details actionRoberto Hueso Gómez2020-09-281-1/+44
| | | | | This action is used to visualize the specific details of a client, such as its IP, Name, MAC, etc.
* Add delete partition viewRoberto Hueso Gómez2020-09-151-1/+32
| | | | This view deletes and formats a partition from the selected machine.
* Fix setup partitions filesystem codes to stringRoberto Hueso Gómez2020-09-151-12/+39
| | | | | | Partition filesystem are encoded with integers in the DB. We need to send the type string instead of the encoded integer, so this patch parses the encoded integer to string.
* Add partitions setup formsRoberto Hueso Gómez2020-09-141-1/+56
| | | | | This provides a menu to setup the internal partitions setup of each machine. Delete partitions is still just a placeholder.
* Fix parse_ips(...) function to avoid parsing CSFRRoberto Hueso Gómez2020-09-141-2/+3
| | | | This avoids trying to parse CSFT token as an IP.
* Fix internal server error codeRoberto Hueso Gómez2020-09-141-2/+2
|
* Add 500 default error handlerRoberto Hueso Gómez2020-09-041-0/+4
| | | | This handles HTTP 500 internal server errors.
* Add 404 default error handler.Roberto Hueso Gómez2020-09-041-0/+4
| | | | This handles HTTP 404 page does not exist errors.
* Add refresh actionRoberto Hueso Gómez2020-09-041-0/+7
| | | | This action can be applied on single or multiple scopes.
* Add WoL actionRoberto Hueso Gómez2020-09-041-0/+15
| | | | | | 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.
* Add reboot actionRoberto Hueso Gómez2020-09-031-0/+7
| | | | This action handles reboot on one or multiple scopes.
* Rename add_state_to_scopes() functionRoberto Hueso Gómez2020-09-021-3/+3
| | | | This function is renamed to add_state_and_ips() which is more accurate.
* Add action_poweroff() view functionRoberto Hueso Gómez2020-09-021-1/+14
| | | | This function handles a poweroff request to one or multiple scopes.
* Implement scopes() view functionRoberto Hueso Gómez2020-09-021-1/+21
| | | | | This function provides the data needed to render the scopes.html template.
* Add basic backend structureRoberto Hueso Gómez2020-08-311-0/+17
This adds views functions and ogServer config loading.