summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
Commit message (Collapse)AuthorAgeFilesLines
* ogcp: add room details view to scopes managementAlejandro Sirgo Rica2024-06-172-0/+20
| | | | | | 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-172-0/+20
| | | | | | 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-172-0/+27
| | | | | | | | | | 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.
* forms: use checkboxes for scope selection in UserFormAlejandro Sirgo Rica2024-06-142-9/+80
| | | | | | | Enable selection of multiple scopes in user/add and user/edit for restricted users. Replace quick form creation with an inline form definition in add_user.html and edit_user.html
* templates: remove dead code from edit_user.htmlAlejandro Sirgo Rica2024-06-141-8/+0
| | | | | Remove the <script> block as the function digestUserFormPassword no longer exists.
* js: allow selection of multiple clients in scopes sidebarAlejandro Sirgo Rica2024-06-141-1/+1
| | | | | | | | | | | Allow the selection of multiple client checkboxes if they belong to the same room. Each checkbox input in the DOM has a "data-parent-room" attribute whose value is the value of the "name" attribute of its parent room scope component. To check if a checkbox is a client and a sibling of the one being checked we check if "data-parent-room" is available for both nodes and if they have the same value.
* ogcp: add disclosure widget to sidebarAlejandro Sirgo Rica2024-06-142-3/+2
| | | | | | | | | | | | Add cache buster to soleta.css in base.html to have control over cache expirity. Bump soleta.css version to ensure browser does not used older (cached) version. Add CSS rules to show a disclosure widget in the sidebar. Show center checkboxes as disabled in the commands view sidebar for visual consistency. Add class "collapsed" to the proper HTML components to keep a proper state on page reload.
* src: revisit sidebar context storage approachAlejandro Sirgo Rica2024-06-142-5/+6
| | | | | | | | | | | Maintain selections made in scope sidebar after clicking an action (ie. client add, room delete, etc.) Use ids instead of names as the name html property is the same for every room and center. Call keepSelectedClients() in macros.html for both Scope Management and Commands instead of only in Commands. Add a "context" value to the checkbox id to separate scope and commands values in local storage.
* 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: fix error report with multiple messagesAlejandro Sirgo Rica2024-06-131-2/+4
| | | | | | | | | Fix the definition of javascript code to generate a correct message window for multiple error messages. The error is cause by a redefinition of 'let bgclass' in multiple lines when the html template receives multiple error messages. Each iteration to generate the code for the error messages tries to redefine the variable bgclass and it causes the js to fail.
* 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: 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.
* templates: use the correct storage units1.1.3-20Alejandro Sirgo Rica2024-05-303-12/+12
| | | | | | | 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-302-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* js: only add MAC to client pills1.1.3-19Alejandro Sirgo Rica2024-05-131-1/+1
| | | | | | Ignore any room, center or folder as they don't have a MAC address. Trying to get the MAC of an scope element without one leads to a JS exception.
* js: remove console.log statementAlejandro Sirgo Rica2024-05-131-1/+1
| | | | Remove print statement generating noise in the browser logs.
* 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.
* js: prevent js exception in pages without pill controlAlejandro Sirgo Rica2024-05-131-1/+1
| | | | | Add check to test if a pill control has been found and don't try to add mac data to non existent client pill controls.
* Make partition id non editable in partition formAlejandro Sirgo Rica2024-05-122-2/+2
| | | | | | | 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.
* js: fix id update in partition form deletionAlejandro Sirgo Rica2024-05-101-1/+1
| | | | | | | Update all the name and id fields of the elements in the partition form after a delete operation. Inconsistent ids make form.validate() to always return False, this causes all the form validation code to be skipped.
* views: add update centerJavier Hernandez2024-02-091-0/+2
| | | | add view to update center data such as its name or comment.
* views: Add update roomJavier Hernandez2024-02-092-0/+21
| | | | Add view to modify room information such as name, gateway and netmask
* views: Add edit-folder1.1.3-15Javier Hernandez2024-02-052-0/+21
| | | | 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-302-0/+43
| | | | | Add list images action that shows a list of all the images in each server and their properties
* templates: show folder iconJavier Hernandez2024-01-301-0/+3
| | | | | | Add icons to differentiate folders. Use &#x1F4C1; which represents folder using emojis.
* 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.
* dashboard: Show all servers, online or offlineJavier Hernandez2024-01-291-2/+10
| | | | | | | Show in dashboard the list of all servers, regardless if they are online or offline. If they are offline, uptime appears as 'offline' Modify dashboard template to make it work with offline servers
* templates: Add versioning to avoid browser caching ogcp.js errorsJavier Hernandez2024-01-191-1/+1
| | | | | | | | | Add version parameter to ogcp.js url. This is so that, if ogcp.js is modified, the browser is able to see that that file has been changed and that it has to load the new version instead of acquiring it from cache. We have experienced stranged errors, related to browsers caching old javascript files, leading to python flask backend backtraces
* 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