-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate that the list of interfaces is loading #315
Conversation
for more information, see https://pre-commit.ci
There's an alternative to this wait time I think we should try first - can you try to trigger The thing about Python imports (as long as the Flask is constantly running anyway) is that there is only a delay to import something heavy the first time it is ever imported, even by local scope |
You're right. Adding It may still be useful to have these changes in case the response takes longer than expected (e.g. if we end up hosting the backend remotely and make this request over a slow internet connection)—though we don't necessarily have to. |
Yeah I'll still check it out
Right but that runs the risk of causing the same issues we've been fixing - I'm saying still use a local scope - but inside a new endpoint that would get triggered in a safe/isolated way on server startup, if that's possible. In case the import fails due to bad environment, only want the endpoint to fail (and even then maybe silently since user didn't explicitly say to do it) not the server itself |
Was originally intending to test using the changes on #300, but realized they weren't available on If so, I can simply change the base for this PR. |
Usually yes but also feel free to just port over the import endpoint defined from that PR; the experimental aspect was the companion endpoint for installation which is not needed here, no telling when (or if) we want to merge #300) |
This PR accounts for the delay in the list population given that the server endpoint now has a startup time.
I'm waiting for the server to return the list of valid interfaces before I render any previously selected ones. This ensures an appropriate message is provided to the user, indicating this operation is in progress—though if desired, I can just render the unvalidated list.
The Add Interface button is also hidden from the user until the search list is populated.