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

Read a DAG from a URL parameter #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

seannyD
Copy link

@seannyD seannyD commented Mar 15, 2018

I'm developing a database of causal hypotheses. I'd like the user to be able to export some of the DAGs in my database into dagitty. I couldn't find an easy way to import a file, without creating a DAG on your server first. If there's already a way to do this, that's great! If not, I've suggested adding some code to allow a user to pass data from a URL parameter into the adj_matrix text box, then reload the DAG. This will allow me to add a link on my website for the user to open the DAG in dagitty, e.g.:

http://www.dagitty.net/dags.html?adjmatrix=B%201%[email protected],-1.460%0AD%20O%[email protected],1.621%0A%0AB%20D

I'm not a security expert, so if this is a bad idea because it will allow arbitrary injection, please ignore this suggestion.

I've tested the addition to main.js, and it seems to work. I guessed where the call should go in the dags.html, but have not tested this. Note that the function loadDagFromUrlParameter() does nothing if it doesn't find a URL parameter named adjmatrix.

@seannyD
Copy link
Author

seannyD commented Jul 31, 2018

Gentle bump on this. My database is now live http://chield.excd.org/. I'm presenting it at a workshop soon, and it would be great if this functionality could be added!

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.

1 participant