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

Adding a simple dat.gui controller #44

Merged
merged 2 commits into from Nov 27, 2014
Merged

Conversation

dmasad
Copy link
Member

@dmasad dmasad commented Nov 13, 2014

Resolves Issue #38 and adds a dat.gui interface to the TextVisualizationServer.

@@ -2,11 +2,17 @@
<head>
<title>{{ model_name }} (Mesa visualization)</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/static/dat.gui.min.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get documentation for the object structure in this file? I'm a bit lost.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added; see if that makes sense of it.

Copy link
Member

Choose a reason for hiding this comment

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

Documentation looks good to me, but I will defer to @kfuruya, b/c I am not strong in the javascripts.

@jackiekazil
Copy link
Member

@dmasad -- When I tried to run this, I had an error...

WARNING:tornado.access:403 GET /ws (127.0.0.1) 0.53ms
WARNING:tornado.access:400 GET /ws (::1) 0.41ms

When I visited... http://localhost:8888/ws
I got the following text returned: Can "Upgrade" only to "WebSocket".

Am I missing something?

@dmasad
Copy link
Member Author

dmasad commented Nov 25, 2014

To load the visualization, you're supposed to only open http://localhost:8888
The /ws is the websocket, which you're not supposed to load directly. I guess that's what happens when you do...?

Try without the /ws and see if it works for you.

@jackiekazil
Copy link
Member

@dmasad when I ran it I got the errors in Terminal. The gui loads when I visit http://localhost:8888, but when I try to do stuff it throws those errors, which is how I got there to begin with.
Make sense?
Am I missing a setting or something?

@dmasad
Copy link
Member Author

dmasad commented Nov 27, 2014

Okay, I think I found it. I couldn't replicate it exactly, but I got a similar error (WARNING:tornado.access:403 GET /ws (127.0.0.1) 0.38ms) when I pointed my browser to http://localhost:8888

It works fine when I go to http://127.0.0.1:8888

I realized the html template is hard-coded to point to "ws://127.0.0.1:{{ port }}/ws" as opposed to localhost. I assumed these were completely interchangeable, but apparently not.

A) Try going to http://127.0.0.1:8888 and seeing if it works for you.
B) Any idea how to give it a relative path?

@jackiekazil
Copy link
Member

I created a ticket for that as a holder, so we can get this merged in.

jackiekazil added a commit that referenced this pull request Nov 27, 2014
@jackiekazil jackiekazil merged commit 551420c into master Nov 27, 2014
@jackiekazil jackiekazil deleted the dmasad.ticket38.dat_gui branch November 27, 2014 01:04
@jackiekazil
Copy link
Member

Oh, and what you mentioned worked, so I merged. :-)

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.

None yet

3 participants