summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
Commit message (Collapse)AuthorAgeFilesLines
...
* views: change repo add view to follow conventionv1.1.3-6Javier Hernandez2023-12-052-3/+3
| | | | | | | | | combine repo_add_get and repo_add_post into one, action_repo_add. This is to follow convention across all the views and to clarify that it is an action. rename repos_details template to repos_add. Now it is clear the purpose of each action template; there is one for each: add, delete and update
* views: add action to update repoJavier Hernandez2023-12-051-0/+2
| | | | | allow the user to update a repo by selecting one and pressing the update button.
* views: add action to delete repoJavier Hernandez2023-12-052-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | allow the user to delete a repo by selecting one and pressing the delete button. Previous to deletion, show the user a confirmation page (a form) with the details of the repo to delete the confirmation form is constructed with the fields of Repoform. RepoForm is also used in template used to create a repo. To make both templates work with RepoForm, RepoForm's field 'create' has been renamed to 'submit' ogcp.js: add a function to make that, when the user selects a repository, the server in which it is contained is automatically checked. We need it checked so that action_repo_delete can know the server to which it has to send the delete request. Use data-server in repos_details.html to make this work Validate, in action_delete_repo, that user has only selected one repo to delete. In order to do that, action_delete_repo view needs to be able to get a list of all selected repos. This is only possible if <input> elements that are associated with repos info contain a different name attribute per repo. In this case, template repos.html has been modified to use name={repo name}-{repo_id}. After this, parse_elements() will work and parse a set containing all selected repos. modify html input associated to repos server in order to follow same convention as in other templates. For example, images uses image-server; scopes, scope-server.
* src: add menu to manage reposJavier Hernandez2023-12-013-0/+78
| | | | | | | | | | | | | | | | | | | | | | | The menu includes a list of the repos of each server. The user can select a server or a repo to make changes. As of now, the only action possible is to add a repo to selected server. The work contained in this commit can be structured in: 1. Add the repos menu: - Add a 'repos' button in the menus bar (base.html). - Add repos.html template to create the management repos menu. - In ogcp.js, add function to store in browser's local storage which elements of the sidebar are uncollapsed. This saves the sidebar state after a page refresh. - Add manage_repos() in views.py 2. Allow to add a repo: - Add template with form to add a repo (repos_details.html) - Create RepoForm(FlaskForm) in action_forms.py - Add repo_add_get() and repo_add_post() in views.py
* templates: translate shutdown state keysJavier Hernandez2023-11-271-1/+1
| | | | Change key element 'Apagado' to its English form 'Shutdown'
* views: allow to edit a clientJavier Hernandez2023-11-241-0/+2
| | | | | | | | | | | Add a form to allow the user to update a client. ip field is in read only mode because this is the primary key to identify a client in db. Fields corresponding to boot mode (ie. oglivedir and boot) are also in read only for now; ogServer has to fix set boot mode functionality before it can be added here.
* Open real time log in a new tabJavier Sánchez Parra2022-11-171-1/+1
|
* Disable scopes tree and add Back button in log viewJavier Sánchez Parra2022-11-171-0/+3
| | | | All views from Commands section have this two attributes.
* Rename "Scopes" section to "Scopes management"Javier Sánchez Parra2022-11-171-1/+1
|
* Show scopes section only to administratorsJavier Sánchez Parra2022-11-171-3/+3
|
* Show servers section only to administratorsJavier Sánchez Parra2022-11-171-1/+1
|
* Add clients in Linux and Windows modeJavier Sánchez Parra2022-11-171-0/+8
| | | | | Scopes tree shows clients booted in Linux and Windows with ogClient installed. It also shows if the user logs in.
* Fix client room retrievingJavier Sánchez Parra2022-09-271-5/+6
| | | | Otherwise, retrieving do not work on clients inside folders.
* Collapse servers imagesJavier Sánchez Parra2022-09-271-6/+9
| | | | Users can collapse images list by clicking on the server.
* Add multiple servers to the dashboard viewDaniel García Moreno2022-09-275-283/+369
|
* Implement single room selection for commands viewDaniel García Moreno2022-09-271-3/+5
|
* Add different selection mode for the tree viewDaniel García Moreno2022-09-273-6/+10
|
* Add Servers sectionJavier Sánchez Parra2022-09-275-46/+47
| | | | | | | In Servers section/view, users can add or delete ogServers from ogCP configuration file. Replaces Repositories views and recycle some of its code.
* Add ogServer parameter to imagesFormJavier Sánchez Parra2022-09-271-2/+15
| | | | | | | | | | When users select an image, its ogServer is sent too. Then, the back-end (flask) processes the form to obtain this ogServer and send it the pertinent requests. It also makes "Image details" view use this new parameter, and adds javascript code to ensure that users can only work with several images at the same time if they belong to the same ogServer.
* Adapt images tree to work with several ogServersJavier Sánchez Parra2022-09-271-8/+14
| | | | | | Images view fetch images from all ogServers configured and show them in the left tree as a nested list. ogServers are represented as the parents of their images.
* Add a room to a center using the scopes treeJavier Sánchez Parra2022-09-271-0/+6
| | | | | With this commit users can select a center from the scopes tree, and then add a room to that center.
* Add current ogServer to scopesFormJavier Sánchez Parra2022-09-271-1/+6
| | | | | | | | | With this commit when users select a scope, the ogServer to which it belongs is also sent. Then when processing the form we obtain this ogServer and we can send it the pertinent requests. This commit also makes action "Add client" to use the ogServer sent in the form.
* Add a client to a room using the scopes treeJavier Sánchez Parra2022-09-271-1/+7
| | | | | With this commit users can select a room from the scopes tree, and then add a client to that room.
* Add "Delete Repository"Javier Sánchez Parra2022-07-042-0/+25
| | | | | In "Repositories" view, users select a repository from the list on the left and press "Delete repository".
* Create "Add Repository" form and viewJavier Sánchez Parra2022-07-042-0/+19
| | | | Creates "Add repository" form with the required inputs: name and IP.
* Add Repositories sectionJavier Sánchez Parra2022-07-042-0/+36
| | | | | In Repositories section/view, users can manage task related to repositories. For example: list, add, delete and edit them.
* Move password hashing to the backendJavier Sánchez Parra2022-06-302-20/+2
| | | | | | | | | | | This patch moves login password hashing from the frontend/javascript to the backend/flask. This patch moves password hashing of login and user management forms. Related commits: * c7b0024 ("Add password hashing") * 661254b ("Add 'Add user' to Users section")
* Add color legend of the client statesJavier Sánchez Parra2022-05-171-0/+11
| | | | | Add an explanatory list of the colors used to represent the different client states.
* Add 'Delete user' to Users sectionv0.9.2Javier Sánchez Parra2022-04-272-0/+19
| | | | | Creates "Delete user" form. The user to be deleted is selected from the sidebar in Users section.
* Add 'Edit user' to Users sectionJavier Sánchez Parra2022-04-272-0/+28
| | | | | | Creates "Edit user" form with the following inputs: password, password confirmation, role (administrator or regular), allowed scopes. It does no allow to change/edit the username.
* Add 'Add user' to Users sectionJavier Sánchez Parra2022-04-272-0/+28
| | | | | Creates "Add user" form with the following inputs: username, password, password confirmation, role (administrator or regular), allowed scopes.
* Add Users sectionJavier Sánchez Parra2022-04-272-0/+38
| | | | | In Users section/view, administrator accounts can manage all task related to users. For example: add, delete and edit users.
* Add password hashingJavier Sánchez Parra2022-04-221-1/+9
| | | | | | | | | | | The front-end now hashes passwords before sending them to the back-end. It uses SHA-512. This commit adds a hidden input which sends the password hash to not interfere with browsers' save password functionality. Also change passwords of the template configuration file for their hashed/digested versions.
* Rename "submit" to "submit_btn"Javier Sánchez Parra2022-04-221-1/+1
| | | | | Otherwise, wtforms use "submit" as id of the <input> tag, shadowing javascript function ".submit()".
* Add import clients actionJavier Sánchez Parra2022-04-192-0/+21
| | | | | | | | | | | 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; }
* Increase toast auto hide delay to 30 secondsJavier Sánchez Parra2022-04-121-1/+1
|
* Rearrange image dropdownJavier Sánchez Parra2022-04-081-4/+4
|
* Add Update image to commandsJavier Sánchez Parra2022-04-082-0/+24
| | | | | | | | 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.
* Add indeterminate checkboxes to scopes treeJavier Sánchez Parra2022-04-081-0/+1
| | | | | | | Each checkbox may have child checkboxes. If all those children are checked, it be checked. If none are checked, it is unchecked. If some of them are checked, then it’s in an indeterminate state (in this case symbolically meaning “partially” checked).
* Simplify scope identifiersJavier Sánchez Parra2022-04-081-5/+5
| | | | | | | | | | | Old id format example: id_1-1_2-4_3-2 New id format example: scope-1-4-2 It represents the node and its ancestors' position with respect to theirs siblings. The rightmost value is the current node position. Commit f70d90ba32a6 introduces the old format.
* Move toasts messages to the bottom rightJavier Sánchez Parra2022-04-081-2/+2
| | | | Also, increase its duration from 5 to 10 seconds.
* 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".
* Submit IPs when scopes tree is read onlyJavier Sánchez Parra2022-04-011-1/+2
| | | | | | | | | | Otherwise, users can not switch between actions without going back to the parent view. This makes "scopesForm" work again in all views and not only in scopes.html and commands.html. Commit feed135554543 introduces this regression.
* Fix typo in scopes templateJavier Sánchez Parra2022-04-011-1/+1
| | | | | | Otherwise, scopes' actions do not set the scopes tree read only. Commit feed135554543 introduces this typo.
* Ask for reference when partitioning several clientsJavier Sánchez Parra2022-04-012-1/+27
| | | | | Allow the user to choose a computer as reference to display the partition scheme form.
* Add ogServer uptime to the dashboardJavier Sánchez Parra2022-03-281-0/+8
| | | | | | | ogServer GET /stats returns ogServer uptime in seconds. Transform seconds to days, hours and minutes and print them in the dashboard.
* Check swap size is not zeroJavier Sánchez Parra2022-03-251-0/+6
| | | | If the server do not have swap, show a warning.
* Replace " " with "_" in HTML scopes IDsJavier Sánchez Parra2022-03-251-2/+2
| | | | | | | | | | | | | | | | | | | Otherwise, scopes with whitespaces in their names breaks the javascript code. From https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id: --- Note: Technically, in HTML5, the value for an id attribute may contain any character, except whitespace characters. However, to avoid inadvertent errors, only ASCII letters, digits, '_', and '-' should be used and the value for an id attribute should start with a letter. For example, . has a special meaning in CSS (it acts as a class selector). Unless you are careful to escape it in the CSS, it won't be recognized as part of the value of an id attribute. It is easy to forget to do this, resulting in bugs in your code that could be hard to detect. ---