summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions
Commit message (Collapse)AuthorAgeFilesLines
* ogcp: show cache contents in client detailsAlejandro Sirgo Rica2024-07-162-145/+6
| | | | | | Show cache contents in client details for a more complete view of the client's state. Move the cache inspector code to its own template for reusability.
* templates: hide part table in client details with no partitionsAlejandro Sirgo Rica2024-07-151-0/+2
| | | | | Remove <table> with partition information in client details form when the selected client has no partition configuration.
* templates: make ClientDetailsForm render more compactAlejandro Sirgo Rica2024-07-151-4/+68
| | | | | | | | Make the client form more compact so the user does not require to scroll to view all the information. Place each label and field in the same row of the form layout. Disable the Maintenance and Remote fields as they have not actual functionality.
* ogcp: add checksum to images in Manage cacheAlejandro Sirgo Rica2024-07-121-0/+1
| | | | | Ease detection of potential problems with images in cache. Show checksum under each image in the form.
* templates: force OS selection in Boot OS form1.1.3-24Alejandro Sirgo Rica2024-07-091-1/+1
| | | | | | Prevent backtrace when not OS is selected before the form submit. Add 'required' attribute to the <input> elements of each OS option in the Boot OS form.
* ogcp: select images of selected partition in image/updateAlejandro Sirgo Rica2024-07-091-5/+38
| | | | | | | | | | | Select the image field value containing the restored image of the partition selected by the user. Create a dictionary where the key is the value= of the partition field and the value is the id of the image restored in the partition. Add each dictionary entry only only if the corresponding image exists in the repository. Pass the dictionary to the HTML template and convert it to JS.
* templates: preserve formatting in script outputAlejandro Sirgo Rica2024-07-011-1/+1
| | | | | Use <pre> instead of <samp> to display command output, as <pre> preserves the new lines and the format of its inner text.
* templates: improve client list in cache and boot os viewsAlejandro Sirgo Rica2024-06-282-2/+10
| | | | Show client IPs inside div components with a custom "card" styling.
* templates: replace start session with boot OSAlejandro Sirgo Rica2024-06-281-1/+1
| | | | | Update the header in the BootOS view to better fit the purpose of the operation.
* templates: add vertical padding to the no cache messageAlejandro Sirgo Rica2024-06-281-1/+1
| | | | | Add vertical padding to the div holding the report of no selected client with cached images.
* templates: hide detailed cache view with zero imagesAlejandro Sirgo Rica2024-06-281-5/+6
| | | | | | Hide the cache inspector when no cache elements are found in neither of the selected clients. Fix js exception caused by an array access in an empty image list.
* templates: fix no image message in manage cache viewAlejandro Sirgo Rica2024-06-281-1/+1
| | | | | The template conditional must show the table when form.images has more than zero elements.
* 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.