summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/images.html
Commit message (Collapse)AuthorAgeFilesLines
* templates: disable sidebar in images and reposAlejandro Sirgo Rica2024-09-161-0/+2
| | | | Disable sidebar interaction in Images and Repos views.
* js: add ogStorage to prevent localStorage key collissionAlejandro Sirgo Rica2024-09-161-1/+1
| | | | | | | | | | | Define ogStorage class to manage the localStorage operations. The new keys are constructed with the following structure: "group-context-id" Where group is either "show" for the collapsed items in the sidebar, or "check" for the selected checkboxes of the sidebar. Add sotrage versioning to delete obsolete localStorage when a new design for the storage is included in ogCP.
* templates: save checkbox state in images and reposAlejandro Sirgo Rica2024-09-161-2/+4
| | | | | Store the checked checkboxes of the sidebar in Images and Repos. Autoselect the correct server after updating the checkboxes.
* js: consolidate sidebar collapse persistence logicAlejandro Sirgo Rica2024-09-161-1/+1
| | | | | Consolidate all the sidebar collapse persistence logic. Implement a single function to handle all the views.
* ogcp: add image restrict functionalityAlejandro Sirgo Rica2024-07-251-0/+4
| | | | | | | | | | | Add center scope restriction using /image/restrict. Add view in Images to update scope permissions. Disable images in Commands for image update and restore if the client belongs to a disabled center. Consolidate template code to render scope selection checkboxes.
* ogcp: add user permission mechanismAlejandro Sirgo Rica2024-06-271-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new user permission system to control the allowed operations accessible from each account. Add a permission matrix editable through the user/add and user/edit views. The permission matrix has client, center, room, folder, image and repository as permission targets and add, update and delete as permission types. Restrict each view based on the user permissions, hide all actions from not autheticated users. permissions defined in the class UserForm. Serialize each user permissions into ogcp.json as: { ... "USERS" [ { "USER": "admin" ... "PERMISSIONS": { "CLIENT": { "ADD": true, "UPDATE": true, "DELETE": true, }, ... <- same structure for "CENTER", "ROOM", "FOLDER", "IMAGE" and "REPOSITORY" } }, ... ], ... } Grant all the permissions to old user configuration to not disrupt their workflow. The administrator will need to assign the permissions for each user. Ignore scope and permission restrictions for admin users. Save permissions and scopes even if the user is admin to account for the case of a temporal admin promotion without losing the previous configuration. Use template inheritance for add_user.html and edit_user.html to prevent big code duplication with the new HTML code to render the permission matrix. Make user administration an admin only feature. Define methods get_permission and target_is_disabled to improve readability in template conditionals that disable features based on user permissions.
* templates: show Delete Image only as adminAlejandro Sirgo Rica2024-06-071-0/+2
| | | | | Hide the Delete Image in user mode using template conditionals. A non admin account should not have access to image deletion.
* Add list images actionJavier Hernandez2024-01-301-0/+2
| | | | | Add list images action that shows a list of all the images in each server and their properties
* Group images by reposJavier Hernandez2023-12-141-10/+20
| | | | | Make the sidebar from the images menu display the list of repos grouped by repos
* Collapse servers imagesJavier Sánchez Parra2022-09-271-6/+9
| | | | Users can collapse images list by clicking on the server.
* 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 back button to all actionsJavier Sánchez Parra2022-03-141-0/+5
| | | | Add a back button to facilitate users to return to the previous page.
* Add confirmation page when deleting imageJose M. Guisado2022-01-271-1/+1
| | | | | | | | 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.
* Add "Delete image" actionJavier Sánchez Parra2021-09-291-0/+2
| | | | | | | Adds a new button in the images view. This action handles image deletion, one at a time for security. Users must select an image using the images tree.
* Add image details actionJavier Sánchez Parra2021-09-031-0/+2
| | | | | This action is used to visualize the specific details of an image, as its ID, name, size, etc.
* Add images viewJavier Sánchez Parra2021-09-031-0/+29
Images view manages all the images stored in the server. Follow up patches adds actions to get and edit image details, and to delete them.