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

Serve UI config from the backend #1025

Closed
betatim opened this issue Dec 4, 2019 · 3 comments
Closed

Serve UI config from the backend #1025

betatim opened this issue Dec 4, 2019 · 3 comments

Comments

@betatim
Copy link
Member

betatim commented Dec 4, 2019

Following up on #1017 (comment). In particular the comment about "reduce duplication".

A possible way to do that which I've seen in other projects is to add an endpoint to the backend from which the UI loads the config. We'd have an endpoint like binder.example.com/_config which returns a JSON which is then used to configure the dropdown and labels on the main page.

The endpoint at /_config has access to the whole config of the binder hub like for example which repo providers are configured etc.

Things to do if you'd like to work on this or even just make a small prototype to see how it would work:

  • add a new endpoint at something like /_config that serves up a static config
  • add new code to our JS which loads the config
  • transfer the labels currently configured in the JS to the repo provider classes
  • modify the /_config endpoint to dynamically generate the JSON it serves from the repo provider classes

Addressing the problem that we have some duplication between repo2docker and BinderHub is something I'd tackle in a new PR and not as part of this one.

@choldgraf
Copy link
Member

I think it's a great idea - you could imagine a BinderHub provider that wants to have a drop-down item that is institution-specific. This could be a way that they can easily configure their hub to do so without needing to fork the BinderHub codebase

@AMMAR-62
Copy link

Is this issue open ?

@consideRatio
Copy link
Member

consideRatio commented Oct 19, 2022

Great question @AMMAR-62! I'm closing it as resolved by #1038!

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

No branches or pull requests

4 participants