summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
Commit message (Collapse)AuthorAgeFilesLines
...
* templates: stilistic change in mode templateJavier Hernandez2024-01-191-4/+4
| | | | Remove warning header and show selected clients above boot-mode tables
* templates: fix wrong navigation detailsJavier Hernandez2024-01-181-2/+2
| | | | Fix wrong navigation details in template select_client.
* views: add an action to view repo details1.1.3-11Javier Hernandez2024-01-162-0/+15
| | | | | Add an action to allow the user to view details (name and ip) of a particular repo.
* views: Add computers to folderJavier Hernandez2024-01-111-6/+8
| | | | | | | | | | Add support for adding computers to a folder. It uses a js script that when selecting a folder in the html form, it will also select the parent of the folder. For instance, if the user were to select a folder that is contained inside a room, the room would also get selected. This allows the view to know which parent contains the folder.
* views: Add delete folderJavier Hernandez2024-01-103-0/+37
| | | | | | | Add functionality to allow the user to delete a folder. Show a confirmation page to the user listing the content of the folder that is about to delete
* src: Add support for adding foldersJavier Hernandez2024-01-102-0/+30
| | | | | | Add support to create a folder able to contain multiple computers. Add support for adding a folder able to contain rooms
* templates: Make stilistic changes in dashboardJavier Hernandez2024-01-031-50/+15
| | | | | | | | | - Remove a table with redundant info; it was displaying server's stats, which was already in another table - Add last update info at the top of the page - Make page more robust by checking if ogLive images are available. Before this patch, page shows a traceback if the ogLive list are not available.
* Warn if clients have different boot modesJavier Hernandez2023-12-221-0/+26
| | | | | | Show user, when attempting to change the bootmode of more than one client with different boot modes, a warning and a table with said bootmodes.
* Remove id from client's bubblesJavier Hernandez2023-12-211-1/+1
| | | | | | | | Remove id from client's bubbles in the following commands: Power (Poweroff, Poweron, Reboot); Setup (Set boot mode, Set ogLive); Client (Start session) To make the string replacement, a custom jinja filter has been created
* templates: rename 'create' button to 'submit'Javier Hernandez2023-12-211-1/+1
| | | | | | | In client_details template, rename 'create' button to 'submit'. This template is used by both client-add and client-edit commands; it would not make sense to have a 'Create' button in client-edit.
* templates: Show username in top navbarv1.1.3-9Javier Hernandez2023-12-181-0/+5
| | | | Show the username of the user currently logged-in in the top navbar.
* Add scope-management for non-admin usersJavier Hernandez2023-12-152-1/+5
| | | | | Add scope-management menu with limited commands for non-admin users; commands allowed are add/edit/edit/delete/import client(s)
* Group images by reposJavier Hernandez2023-12-141-10/+20
| | | | | Make the sidebar from the images menu display the list of repos grouped by repos
* base: Increase column size for sidebarv1.1.3-8Javier Hernandez2023-12-121-1/+1
| | | | Make the sidebar wider to improve readability of its content
* ogcp.js: Fix bug when adding a new partitionJavier Hernandez2023-12-111-1/+1
| | | | | | | | | | | | | | | | | Fix a bug that made the 'add a new partition' button unusable if all partitions (rows) were deleted. The reason for this bug was that the AddPartition() function would add a new partition by cloning an already present html row element. This would fail if no more rows were present in the table. The solution implemented checks, previous to delete a partition, if it is the last partition. If it is, then, instead of removing the whole row, it just empties it. Html button element needs to contain 'type="button"' attribute for this to work. Otherwise, default action for the button is submit and it would redirect after clicking.
* templates: add missing delete/update repository templatesv1.1.3-7OpenGnSys Support Team2023-12-112-0/+34
| | | | | | | Add missing templates. Fixes: 15dd4c2a8f69 ('views: add action to update repo') Fixes: 152337b6bdb8 ('views: add action to delete repo')
* 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()".