TritonDataCenter / sdc-adminui

Operator portal for Triton DataCenter
Mozilla Public License 2.0
15 stars 27 forks source link

LINUXCN-16 Filter the Next Boot dropdown to only show vaild platform images #268

Closed travispaul closed 1 year ago

travispaul commented 1 year ago

On CNs that have been setup, only show PIs for the same OS. On CNs not yet setup, show all PIs and make it clear which OS is being selected.

The screenshots below show a headnode with the following PIs installed:

# sdcadm platform list -s os
VERSION           CURRENT_PLATFORM  BOOT_PLATFORM  LATEST  DEFAULT  OS
20221107T154729Z  0                 0              false   false    linux
20230227T175258Z  0                 0              false   false    linux
20230530T183117Z  1                 1              true    false    linux
20230406T001127Z  1                 1              false   false    smartos
20230504T000449Z  0                 0              false   false    smartos
20230518T015119Z  0                 0              false   true     smartos
20230601T000726Z  1                 1              true    false    smartos

On Linux CNs that are setup, only show Linux PIs

Before

All PIs were listed with no way to differentiate Linux from SmartOS:

image

After

Now only showing Linux PIs:

Screenshot 2023-06-28 at 11 47 26 AM

On SmartOS CNs that are setup, only show SmartOS PIs

Before

All PIs were listed with no way to differentiate SmartOS from Linux:

image

After

Now only showing SmartOS PIs:

Screenshot 2023-06-28 at 11 48 41 AM

On CNs that are not yet setup, show all PIs grouped by OS

Before

All PIs were listed with no way to differentiate SmartOS from Linux:

image

After

Now showing all PIs grouped by OS:

Screenshot 2023-06-28 at 12 05 27 PM

On the default boot option dropdown show all PIs grouped by OS

This could be presented a bit nicer but this dropdown is constructed differently from the one on the Servers page so I opted for the smallest change that provided the most value instead of a larger refactor.

Before

All PIs were listed with no way to differentiate SmartOS from Linux:

image

After

OS is shown along with each PI version sorted by OS and PI version.

Screenshot 2023-06-28 at 12 06 39 PM

New Favicon

image

Operating System is shown on the Platform table of the Server view

Screenshot 2023-06-09 at 11 23 16 AM

Screenshot 2023-06-09 at 11 23 08 AM

Testing Notes

Screenshots were captured from Admin UI running in a local Triton with these changes. I also changed the PI using the new drop down and confirmed the selected PI was still shown on page refresh and that a reboot of the CN resulted in the correct PI. In the case of the default boot PI, I also confirmed it was set as default in sdcadm platform list and that a new CN booted into the selected version.

travispaul commented 1 year ago

Also installed locally via sdcadm update -C experimental adminui@PR-268-20230609T162053Z-g5fd07c5