Problem: Getting details for every server in list is not good
Solution: Broke up the code for requesting Floating IPs, Console URLs, and Cockpit login for a server into three separate functions. Using them in: 1. Server detail view, when receiving a server detail response: Call all three functions 2. Server list view, when receiving a server list response (which now includes details): For each server, call only the Cockpit login request function Also changed 'OpenStack.Types.Server' so the 'details' attribute is now of type 'ServerDetails' instead of 'Maybe ServerDetails'. This change is possible thanks to switching to always getting details when listing servers. It resulted in the above refactoring being cleaner, as well as 'flatter' logic in other areas of the code which deal with 'ServerDetails'.
Loading
Please register or sign in to comment