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

Question: Can you pre-configure the servers? #105

Closed
jasoniangreen opened this issue Feb 27, 2019 · 4 comments · Fixed by #137
Closed

Question: Can you pre-configure the servers? #105

jasoniangreen opened this issue Feb 27, 2019 · 4 comments · Fixed by #137
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jasoniangreen
Copy link

Sorry if this is already answered, but I can't seem to find it anywhere. Is there anyway to configure a list of services, to stop you having to setup servers on every "installation" of the web app?

If not, what would you suggest is the best approach to pre-load a server or list of servers?

@acelaya
Copy link
Member

acelaya commented Feb 27, 2019

Since this is a pure client-side app, the list of servers is just saved in the browser's local storage.

However, you can export the list of servers from the servers drop-down menu, and then import it from other browser.

Does that answer your question?

@jasoniangreen
Copy link
Author

Yes, more or less.... if we wanted to have it preloaded without exporting and importing, we basically just need to fork this and do that ourselves. For instance, it might be nice to be able to pass the server info via env vars or some config file so your users don't need to enter anything. I realise that's not the intention of this app, it's meant to be quite generic.

@acelaya
Copy link
Member

acelaya commented Feb 27, 2019

Well, I suppose I could think on some way to solve this. I'm starting to have some ideas.

Of course, if you fork it and find a solution for this, please, provide a PR with that :)

@acelaya acelaya added this to the 2.1.0 milestone Mar 3, 2019
@acelaya acelaya added the enhancement New feature or request label Mar 3, 2019
@acelaya acelaya self-assigned this Mar 3, 2019
@acelaya
Copy link
Member

acelaya commented Apr 28, 2019

Hey @jasoniangreen I more or less have an approach that could work, but since the code is statically compiled, I couldn't find a non-hacky way to dynamically load env vars.

Because of this, the approach is based on volumes instead. You would need to mount a volume containing the list of servers (basically a static JSON file).

Then the app tries to load it via HTTP when no servers are found in the local storage (which is usually the first time you run the app in a browser). If it gets a 404, then it just keeps behaving as it is now, and otherwise, it parses the file and uses it as the "starting point".

Do you think this could work?

Maybe in the future I try to make this endpoint dynamic, but as I said, with a statically compiled code it is not easy.

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

Successfully merging a pull request may close this issue.

2 participants