summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions
Commit message (Collapse)AuthorAgeFilesLines
* views: preselect pxe boot mode in add clientJavier Hernandez2024-02-051-0/+19
| | | | | | | | preselect 'pxe' (if available) at adding a new client. use a dedicated template for adding a client and remove irrelevant partition table; client has yet to set its partition, so everytime, the table would load empty.
* improve delete confirmationJavier Hernandez2024-02-053-35/+43
| | | | | | | | Make delete confirmations show information in a manner that is easier to read. This includes delete confirmations for centers, room and folder. Messages are now more clear. Also, content table shows the type of the items (folder, room, etc.)
* Make list_images show only selected imagesJavier Hernandez2024-02-021-12/+7
| | | | | | | | | | | Make list images command show only information of the images the user has selected in the sidebar. Improve readability of the information. Show size and data size attributes rounded Warn the user if no images have been selected in sidebar
* improve delete confirmation pageJavier Hernandez2024-02-013-7/+85
| | | | | | | | | | In delete-center, delete-room and delete-folder confirmation pages, show the ancestors of the items about to delete. Likewise, show the items it contains. For example, if user is about to delete a room, confirmation page will display in which center it is contained and the clients and folder it has inside
* Add list images actionJavier Hernandez2024-01-301-0/+41
| | | | | Add list images action that shows a list of all the images in each server and their properties
* views: Preselect most used ogliveJavier Hernandez2024-01-291-0/+25
| | | | | | | | When setting up oglive, preselect oglive that is most used by selected clients. If only one client is selected, preselect that of the client. In the unusual scenario where a client is set with an oglive that is not in the ogserver's list of available oglives, preselect default.
* 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-161-0/+13
| | | | | Add an action to allow the user to view details (name and ip) of a particular repo.
* views: Add delete folderJavier Hernandez2024-01-101-0/+29
| | | | | | | 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-101-0/+19
| | | | | | Add support to create a folder able to contain multiple computers. Add support for adding a folder able to contain rooms
* 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.
* 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.
* 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-051-2/+2
| | | | | | | | | 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 delete repoJavier Hernandez2023-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | 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
* 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.
* Add Servers sectionJavier Sánchez Parra2022-09-272-7/+7
| | | | | | | In Servers section/view, users can add or delete ogServers from ogCP configuration file. Replaces Repositories views and recycle some of its code.
* Add "Delete Repository"Javier Sánchez Parra2022-07-041-0/+23
| | | | | 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-041-0/+17
| | | | Creates "Add repository" form with the required inputs: name and IP.
* 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.