Commit Graph

509 Commits (233156b19ab2b3d490a8bb450bbb22fdff4caaec)
 

Author SHA1 Message Date
Alejandro Sirgo Rica 233156b19a js: consolidate sidebar collapse persistence logic
Consolidate all the sidebar collapse persistence logic.
Implement a single function to handle all the views.
2024-09-16 12:34:32 +02:00
Alejandro Sirgo Rica f85c61df99 templates: fix initial repos disclosure widget status
Show the proper state of the disclosure widget when a repo starts
as collapsed.
2024-09-16 12:18:29 +02:00
Alejandro Sirgo Rica 65d2d75ddb templates: improve client report in image create view
Remove the line reporting the IP of the selected client. No other
view does that and that information is already available in the
client pills.
Add client pills widget.
2024-09-16 12:05:04 +02:00
Alejandro Sirgo Rica 696a81fd11 templates: add name and status to client list
Add a client name column to the client list view accessed through
the Dashboard.

Add status column to the client list.

Move client status leyend into a separate file.

Show the client status leyend in client list.

Fix the 0 link speed conditional.

Reuse the data returned by get_scopes() to reduce the number of
requests.
2024-09-11 12:24:44 +02:00
Alejandro Sirgo Rica 6b33268b5c ogcp: add view to assign repo to clients
Add /action/repo/set in Commands to assign a repository to
multiple clients.

The view includes the actual repo assigned in the client pills
and shows a table with the clients grouped by repo when multiple
repos are assigned among the selected clients.
2024-09-10 15:11:11 +02:00
Alejandro Sirgo Rica a1b164b106 templates: add efi data to /client/info
Show EFI info obtained through GET /efi.
2024-09-10 15:11:11 +02:00
Alejandro Sirgo Rica fd4da7d3ed views: set repo address limit to 128
Allow up to 128 IP addresses for repositories.
2024-09-10 12:20:29 +02:00
Alejandro Sirgo Rica 6e1d266daf views: sort repositories by name
Show repositories sorted in an alphanumeric fashion inside the
sidebar of /images and the respective child views.

Sort repositories in the sidebar of /repos.
2024-09-04 15:36:09 +02:00
Alejandro Sirgo Rica 23b49f0a6a templates: add image name to title in image/config
Add image name to the title in the view image/config.
2024-09-04 10:50:52 +02:00
Alejandro Sirgo Rica 3f06fe23aa templates: remove sidebar from client/list
Remove sidebar from the client/list view.
2024-09-03 16:26:42 +02:00
Alejandro Sirgo Rica 7613cd8017 ogcp: add server ip configuration
Enable server view in the main toolbar.

Hide Add server and Delete server buttons.

Add Update server button.

Add server/update view to edit the server addresses.
2024-09-03 16:26:22 +02:00
Alejandro Sirgo Rica c1ac88e47c templates: fix ip card list spacing
Remove unwanted witespace caused by tabs and spaces.
Add margin to the ip card style to define an explicit spacing.
2024-09-03 09:52:26 +02:00
Alejandro Sirgo Rica 15f5af00e7 templates: show excluded clients from partition operation
Show the list of IPs of the clients withut the selected disk to
partition in the partition and format form.
2024-09-03 09:42:23 +02:00
Alejandro Sirgo Rica b433d84095 views: restrict image restore update and create to disk 1
Keep restore update and create image operations restricted to the
first disk as enabling it for multiple disk is untested and
requires more work.
2024-09-02 15:05:59 +02:00
Alejandro Sirgo Rica d00e437b8d ogcp: add support for multi-disk partition and format
Add support for selecting different disks in the disk inspector.

Add disk_inspector.html as a template to show the disk contents of
a client. The view can define the variable readonly_disk_inspector
to make the view non editable.

Use disk_inspector.html in the following views:
- client details
- partition and format

Update code to obtain the partitions of a client to better fit the
requirements of disk_inspector.html

Remove code to setup the SetupForm as the contents of the disks
are now dynamically loaded through javascript.
2024-09-02 15:05:45 +02:00
Alejandro Sirgo Rica 78a26f947f templates: use Fetch image as text for the Cache image button
Use "Fetch image" as text for the button to access the view
where the user selects images to add to cache.
2024-09-02 15:05:31 +02:00
Alejandro Sirgo Rica 31766a3d07 ogcp: add support for multi-ip repositories
Add support for the new API REST for repository management where
the address is a list of ips instead of a single string.

Add dynamic address creation in /action/repo/update and
/action/repo/add forms through delete and add buttons in the form.

Update /image/restore and /cache/fetch to use repository_id.

Add additional repository form validations.
2024-08-30 13:34:55 +02:00
Alejandro Sirgo Rica bcd18241c7 ogcp: add disk restrictions in partition and format
Use common disk space across all the selected clients.

Show dynamic disk partition graph in the partition view.

Limit partition sizes dynamically in the form.

Move js code to handle the addition and removal of
partitions into the html file to debloat ogcp.js and keep
the functions local to the only file they manipulate.
2024-08-22 10:04:55 +02:00
Alejandro Sirgo Rica aab70b0222 views: remove accents in image name
Remove accents in image name string. Special characters are not
supported for image names.
2024-08-21 11:25:44 +02:00
Alejandro Sirgo Rica 37efed8d30 template: prevent backtrace in /client/list
Don't access client.speed if the field is not present.
2024-08-09 10:01:52 +02:00
Alejandro Sirgo Rica 4b105b96b5 templates: adjust capitalization in commands button
Use "Restore image" instead of "Restore Image" for consistency.
2024-08-09 10:01:52 +02:00
Alejandro Sirgo Rica 844bc1e7c6 ogcp: Add /action/cache/fetch endpoint
Add view to request the download of images into the client's cache.
2024-08-09 10:01:23 +02:00
Alejandro Sirgo Rica ace0c5bb46 views: enable multi-image deletion
Allow the deletion of multiple images in image/delete.
2024-08-06 12:40:33 +02:00
Alejandro Sirgo Rica 4c1a86249b views: fix image create backtrace
Fix backtrace caused by efd0b8ac
Don't access the field scopes in ImageCreateForm as it does not
exist.
2024-08-06 10:35:17 +02:00
Alejandro Sirgo Rica 8e16c31952 views: sort images based on alphabetical name order
Show images in alphabetical order in every views listing images.
The only exception is the dashboard as it shows them from newer
to older.
2024-08-06 09:24:44 +02:00
Alejandro Sirgo Rica 35cfb59f4c css: add iOS fonts to disclosure widget
Add Helvetica fonts to the fonts used to render the disclosure
widget in the sidebar.
2024-08-05 11:32:23 +02:00
Alejandro Sirgo Rica d1e9469326 js: enable center selection in Commands
Enable center checkboxes and implement selection of clients from
multiple rooms in the same center.
2024-08-05 10:43:28 +02:00
Alejandro Sirgo Rica 3e35997131 ogcp: add connected clients list view
Add view to show the connected clients with access to the client
details of each one. The view is accessible through the main
dashboard.
2024-08-05 10:03:12 +02:00
Alejandro Sirgo Rica 695b83d473 templates: link to images view from the dashboard
Add link to image count in dashboard to open images view.
2024-07-30 12:23:20 +02:00
Alejandro Sirgo Rica 87b8e34dab views: add missing checks for offline ogServer
check when the API REST responses are null and report that
ogServer might be offline.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica fce0ee94c6 templates: make client details template more compact
Make the form template update automatically after form definition
modifications. Use a loop to render the for fields.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica 52b61df025 js: use div instead of br in client pills
Improve html structure inside client pills so the values can be
obtained with jquery by matching the name field of the div.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica c5a8c82b35 js: add red highlight to slow client link speed in client pills
Add a red inner pill to the link speed value when the speed is
lower than 1Gb/s.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica 6628d93d86 views: restrict EFI part size to 500MiB or higher
Modern Windows systems require higher EFI partition sizes than
most other OS.
Validate partition & format form to ensure the EFI partition has
as size of 500MiB or higher.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica efd0b8acb3 ogcp: add image restrict functionality
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.
2024-07-25 09:48:12 +02:00
Alejandro Sirgo Rica 594d655d6b css: add fixed font to disclosure widget
Prevent inconsistent visuals in different browser configurations.
Make the disclosure widget always look the same.
2024-07-25 09:48:00 +02:00
Alejandro Sirgo Rica c1d08df31d ogcp: improve sidebar logic in Commands
Disable all checkboxes of scopes of level higher than room in the
$(window).on('pageshow', function) callback.

Set checkboxes as "indeterminate" when not every children is
selected but have some of its children selected.

[x] center
  [x] room1
      [x] client1
      [x] client1

[-] center
  [ ] room1
  [-] room2
      [ ] client1
      [x] client1

Send all selected sidebar fields as form fields. This requires
setting disabled to false and replacing indeterminate = true
to checked = true in the .on('submit', function) callback.

When a checkbox is clicked:
1. Find the room branch of the checked input.
[ ] center
  [ ] room1
  [ ] room2 <- root of the room branch
      [ ] client1 <-- clicked item

2. Uncheck all the checkboxes outside of the room branch.
3. Set all the children of the clicked item to the same value
   as the clicked item.
4. Set the parent checked or indeterminate values.
5. Save checkbox status.
2024-07-22 15:57:51 +02:00
Alejandro Sirgo Rica c3d2582aa6 views: add repository_id to image/update payload
Give ogServer context about the proper repository to process the
correct image.
2024-07-19 14:31:21 +02:00
Alejandro Sirgo Rica 33d4c31f46 views: exclude clients with no partition in image/restore
Clients cannot have an image restore when no partition configuration
is available.
Shown an error listing all the clients with no partitions.
2024-07-17 13:17:58 +02:00
Alejandro Sirgo Rica ea28a4baf1 css: use min-width instad of wifth for client pills
Some ogLive names can be large and a fixed size makes the text
overflow under other client pills.
Let the client pills grow if needed to fit its content.
2024-07-17 10:59:29 +02:00
Alejandro Sirgo Rica 78fd46ad4f ogcp: show oglive client groups by ip
Use the same visualization as the other parts of the web in the
table that groups clients by ogLive.
2024-07-17 10:57:44 +02:00
Alejandro Sirgo Rica cae11fb04e views: list default oglive in Set ogLive form
Show default oglive as "ogLive (live name)" as the last option
int the Set ogLive form.
The previous implementation defined the default oglive as the
most used when the default one is defined by /oglive/list.
2024-07-17 10:32:56 +02:00
Alejandro Sirgo Rica 314a173b6c ogcp: show cache contents in client details
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.
2024-07-16 12:55:31 +02:00
Alejandro Sirgo Rica 5af2b3738b ogcp: enable modification of client ip
Add 'id' value to the /client/update payload.
Enable modification for the ip input field  in the client update
form.
2024-07-15 14:45:49 +02:00
Alejandro Sirgo Rica 0d2f38ac47 templates: hide part table in client details with no partitions
Remove <table> with partition information in client details form
when the selected client has no partition configuration.
2024-07-15 14:07:45 +02:00
Alejandro Sirgo Rica dc1c630464 templates: make ClientDetailsForm render more compact
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.
2024-07-15 14:03:47 +02:00
Alejandro Sirgo Rica 1548b6338a ogcp: show checksum in image info
Improve potential image troubleshooting within ogCP.
Add checksum to the image info view.

Show "Unknown" when no checksum is available.
2024-07-12 09:16:28 +02:00
Alejandro Sirgo Rica b5cb42006e ogcp: add checksum to images in Manage cache
Ease detection of potential problems with images in cache.
Show checksum under each image in the form.
2024-07-12 09:11:28 +02:00
Alejandro Sirgo Rica 514201e6a1 templates: force CSS update to show oglive indicator
Increase CSS version to update CSS file in browser cache.
2024-07-11 10:54:38 +02:00
Alejandro Sirgo Rica 6ce7dd7625 templates: force OS selection in Boot OS form
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.
2024-07-09 16:42:08 +02:00