The better fix for this after Jeff and I looked into this is to break up the inspector rendering into two steps. The first loads the inspector UI (absent the service/charm info), the second populates the info.
Much as we do now, we check to see if we have model and charm data; if we do, we proceed directly to the second stop. If not, we set up a function listening for the db.services and db.charms add signals, to check the db for the necessary info each time it's added. After a timeout, if no data is found, we can abort much as we do now (send notification and close the inspector).
This function needs to detach itself from the db events once it finds the data it needs, and then proceed to the second rendering step.
The better fix for this after Jeff and I looked into this is to break up the inspector rendering into two steps. The first loads the inspector UI (absent the service/charm info), the second populates the info.
Much as we do now, we check to see if we have model and charm data; if we do, we proceed directly to the second stop. If not, we set up a function listening for the db.services and db.charms add signals, to check the db for the necessary info each time it's added. After a timeout, if no data is found, we can abort much as we do now (send notification and close the inspector).
This function needs to detach itself from the db events once it finds the data it needs, and then proceed to the second rendering step.