summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions
Commit message (Collapse)AuthorAgeFilesLines
* ogcp: improve page heading styleAlejandro Sirgo Rica2024-06-2743-58/+58
| | | | Make headings take less space and have a dashed line under them.
* ogcp: add support to view script outputAlejandro Sirgo Rica2024-06-251-0/+74
| | | | | | | | | | Add view at /action/script/output to visualize the result of /shell/run for multiple clients. Use shell/output to request the execution data of the selected clients. Each client element has execution timestamip (UTC), client ip, cmd, return code and stdout of the executed command.
* ogcp: add support to run scripts in clientsAlejandro Sirgo Rica2024-06-251-0/+25
| | | | | | | | Add view at /action/script/run to visualize the available scripts and run a single script file in the selected clients. Use shell/list to request the script list and shell/run API call to request the execution.
* ogcp: add room details view to scopes managementAlejandro Sirgo Rica2024-06-171-0/+18
| | | | | | Add a readonly view for the room data. Mark all the form fields as readonly and set the hidden attribute to the submit field.
* ogcp: add center details view to scopes managementAlejandro Sirgo Rica2024-06-171-0/+18
| | | | | | Add a readonly view for the center data. Mark all the form fields as readonly and set the hidden attribute to the submit field.
* ogcp: add move client to scopes managementAlejandro Sirgo Rica2024-06-171-0/+25
| | | | | | | | | | Add front end for the client/move REST API. Enable the move of multiple clients selected from the sidebar of Scopes Management. Show the target of the move operation as a list of paths in a dropdown widget in the form. Each path will be structured as: Server/Center/Room The path will also contain folders if they are present.
* templates: remove console.log statement in mode.htmlAlejandro Sirgo Rica2024-06-171-1/+0
| | | | Remove print statement generating noise in the browser logs
* templates: show oglive in client pillsAlejandro Sirgo Rica2024-06-171-0/+19
| | | | | | Add oglive to each client pill in action/oglive using js. This makes easier to have a global perspective of the client's configuration.
* templates: add missing center_update.htmlAlejandro Sirgo Rica2024-06-131-0/+18
| | | | | Add html template for the route /action/center/update. Finish the work started in commit 6ec26d16.
* templates: show boot mode in client pillsAlejandro Sirgo Rica2024-06-071-0/+18
| | | | | | Add boot mode to each client pill in action/mode using js. This makes easier to have a global perspective of the client's configuration.
* templates: show image file table only if clients have a cacheAlejandro Sirgo Rica2024-06-071-0/+6
| | | | | Hide form table when the client's cache is empty and inform the user about the selected clients not having images in cache.
* templates: use the correct storage units1.1.3-20Alejandro Sirgo Rica2024-05-302-3/+3
| | | | | | | Use base 2 storage units in html templates as that's the correct representation for the values shown in the web. Remove units such as "Gbytes" and "MB" for their binary byte unit counterparts.
* ogcp: add cache management pageAlejandro Sirgo Rica2024-05-301-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement cache management through cache/list and cache/delete API REST methods. The view corresponds to the URL action/cache and contains three main parts: - Free cache available in the client's bubbles. - Image selection form to request the deletion and view the client with that image in cache. - Cache details per client to see total, used and available cache. The main usecase for the view is the removal of cache to make room for new images in clients with slow connections. Checking clients where available cache space is not enough to hold the new image and then requesting removal of specific images. The html template receives the following structures from the view: storage_data[ip] = {'used': 223452345, 'total': 2345234523452} client_images[ip] = [f'{image_name}.{image_checksum}', ...] image_data[f'{image_name}.{image_checksum}'] = { clients: ['192.168.0.1', ...], size: 34534530850, name: image_name, }
* make the boot OS form work over multiple clientsAlejandro Sirgo Rica2024-05-161-5/+32
| | | | | | | | | Enable working over multiple clients even if their OS configuration is different to greatly improve the user's workflow. Group clients with the same configuration under the same checkbox in the form. Report clients excluded from the boot instruction due to not matching OS configuration.
* remove Format field from partition setup formAlejandro Sirgo Rica2024-05-131-2/+0
| | | | | | | Remove the 'Format' field from the Partition and Format form as the default value will always be to format the partitions. This will lead to less portantial codepaths to maintain and support and less manual clicks in the web form.
* Make partition id non editable in partition formAlejandro Sirgo Rica2024-05-121-1/+1
| | | | | | | Show the partition id as a non editable label in each partition of the Partition and Format form. Assign sequential partition id from top to down and recalculate every partition id when a partition is removed.
* views: Add update roomJavier Hernandez2024-02-091-0/+19
| | | | Add view to modify room information such as name, gateway and netmask
* views: Add edit-folder1.1.3-15Javier Hernandez2024-02-051-0/+19
| | | | Add view to modify folder information such as name
* templates: remove Server: and Repo: in list imagesOpenGnSys Support Team2024-02-051-2/+1
| | | | | | | Although ogcp support for multiple server, the plan is to only support for one server in this version. Remove Server: context information and Repo: in list images
* 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.