Skip to content
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

Browser waits for a timeout on http://maps.googleapis.com/maps/api/js when internet connection is limited or missing #556

Closed
stustison opened this issue Sep 17, 2013 · 4 comments
Assignees
Milestone

Comments

@stustison
Copy link

When running Hawtio behind a firewall with limited internet access or without any internet access, the browser will wait for a timeout on the script "http://maps.googleapis.com/maps/api/js?sensor=false" that is being loaded by hawtio-web/.../index.html

This appears to be for some visualization plugin according to the git log. Is there any way this can be part of that plugin's scripts as opposed to on index.html for all of Hawtio? Thanks!

@gashcrumb
Copy link
Member

Yeah, it's annoying, I've taken a stab at getting this out of index.html once before, unfortunately that particular script appends more scripts to the DOM, so can't be dynamically loaded, attempts to do so result in errors. Supposedly there's a way to load the API and avoid the DOM manipulation but I've not had luck yet:

http://stackoverflow.com/questions/2811787/jquery-how-can-i-load-the-google-maps-api-via-ajax

I'll take another stab tomorrow, as it's definitely annoying, even for me in development since the browser tends to wait on this URL a lot during refresh :-)

@ghost ghost assigned gashcrumb Sep 17, 2013
@stustison
Copy link
Author

Thanks for taking a look! We'd really like to be able to use Hawtio in an environment without an internet connection out of the box. Would it be possible to add a configuration flag of some sort that could be checked when loading? I think it is reasonable to assume that you know whether or not the internet will be available when you're deploying your container.

@gashcrumb
Copy link
Member

Yeah, I think that should be do-able. Ideally I'd do the loading from the Fabric "map" page which is the only page that uses the maps API, so if we can get rid of the <script> from index.html just that one page won't work properly but everything else will be fine.

@gashcrumb
Copy link
Member

Guess it just took a revisit, figured out a way to defer loading the script until the maps tab is actually accessed. I also added an item in the Preferences page that lets you disable the tab, though by default it's enabled. Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants