Generation Wizard only works on Linux
Closed this issue · 0 comments
The ui provides a menu entry New visualization
where you can customize and start the generation process. Currently, these only works on Linux (and maybe masOS), but not on Windows. The reasons are as follows:
Docker uses a separate sub network. Every container has its own IP inside this network and can access every other container. This works fine on all platforms. Besides this private IP a container might have a public IP. In our case this is localhost:8082 for the ui and localhost:8083 for the generator or the public URL in case Getaviz is hosted somewhere.
Our UI is consists mostly of client-side JavaScript, including the GenerationFormController. When the form is submitted, we try to access the private IP of the generation container from the client. But the client (the host of the docker containers, i.e., your computer) is not part of the sub network and therefore cannot access these private IPs, so we get a timeout. Instead, we should invoke the generation process not from the client but from the server and then everything should work fine. This will require some changes to the UI, we cannot solve this with client-side JavaScript!
The reason it works on Linux is, that Linux host machines can access the private IPs of the containers by default. However, this is still an unusual behavior. Only the frontend shoul be accessible public, not every backend service!