Skip to content

enable query parameter passing#35

Open
marqh wants to merge 2 commits into
takluyver:masterfrom
marqh:queryParams
Open

enable query parameter passing#35
marqh wants to merge 2 commits into
takluyver:masterfrom
marqh:queryParams

Conversation

@marqh

@marqh marqh commented Jul 27, 2016

Copy link
Copy Markdown

Hi @takluyver

Great tool, many thanks.

I have a proposed adaption, which enable query parameters to be passed to the notebook to be opened.

This enables a number of use cases to be addressed, including

https://localhost:8888/notebooks/explore.ipynb?dashboard

opening the notebook in dashboard view

I hope this seems like a useful feature. Is the implementation up to scratch?

cheers
mark

Comment thread nbopen.py Outdated
notebook_url = url_path_join('notebooks', url_escape(path))
if query:
notebook_url = notebook_url + query
notebookapp.launch_new_instance(default_url=notebook_url,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_url will, for the lifetime of the notebook server it starts, redirect requests for / to default_url. I'd rather not change the behaviour of the notebook server like that just to get it to open the right page once.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, this is behaviour which affects a number of aspects.

I will investigate a plausible alternative

@marqh

marqh commented Aug 5, 2016

Copy link
Copy Markdown
Author

Hi @takluyver

I have altered the approach, such that the process to open a new notebook can be held in a thread whilst a new server is created, if required

this has the advantage that the logic for opening a notebook is encapsulated, rather than being different for a new server or an already open one

however, there are aspects that I think could be neater, for example, there is an arbitrary time to wait, which seems a bit inelegant

if you like the approach in principle, I can look to tidy up the implementation; any suggestions on this are most welcome
However, if the approach raises significant concerns for you, let me know and i'll not pursue it further

thank you
mark

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

Successfully merging this pull request may close these issues.

2 participants