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

Issue#706 websockets #724

Merged
merged 24 commits into from
Jul 14, 2015
Merged

Issue#706 websockets #724

merged 24 commits into from
Jul 14, 2015

Conversation

gkadillak
Copy link
Contributor

No description provided.

@@ -100,6 +100,7 @@
<script src="/static/js/lib/moment.min.js"></script>
<script src="/static/js/lib/simple-slider.min.js"></script>
<script src="/static/js/lib/chosen.jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.6/socket.io.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

@gkadillak Sorry if I've got the wrong end of the stick but shouldn't we copy this library "socket.io.min.js" to our local stash (/static/js/lib/) as what if someone is on a network with limited / or no internet access?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is merely me being lazy, @phillxnet. Once the code gets pushed to production, the hard copy of the file will be referenced.

@phillxnet
Copy link
Member

@gkadillak from what I can tell you are setting up some kind of system service and using nginx as a proxy but if we use 127.0.0.1:8080 do we not run the risk of clashing with our default ownCloud Rock-on WebUI port which I'm assuming is also listening on localhost as well as the ethernet port.

ie on 3.8-2 release with ownCloud Rock-on on:-

nmap -sT localhost | grep 8080
8080/tcp  open  http-proxy

and with ownCloud off it's not there so it looks like the ownCloud Rock-on is setting up it's own proxy on this port and localhost already.

Sorry if I have this all wrong.

@schakrava
Copy link
Member

That's a very good point @phillxnet. I am voting for 8001, since gunicorn runs next to it on 8000.

@gkadillak
Copy link
Contributor Author

8001 works with me. I'll make that change right now.

gkadillak and others added 21 commits July 10, 2015 11:14
The event handler map is now used to invoke events as they come in from
the websocket connection. Very useful tool. Also, error handling for the
websockets was figured out. Essentially, to send useful error messages
to the client, you must use <code>self.emit()</code> but with a
different key. <code>self.error()</code> is useful for producing
messages on the server logs but not for translating information to the client.
The annoying error in the console from d3 is now fixed (something having
to do with transform=null). Also, the event handler is more robust. All
that's needed is RockStorSocket.addListener(callback, context,
'namespace'). The namespace is special because it expects a semicolon
separating the socket variable name as well as what the function
does (e.g. sysinfo:uptime).
@schakrava
Copy link
Member

Fixes #724

schakrava added a commit that referenced this pull request Jul 14, 2015
@schakrava schakrava merged commit 56a4775 into rockstor:master Jul 14, 2015
@gkadillak gkadillak deleted the issue#706-websockets branch July 14, 2015 23:57
@schakrava schakrava mentioned this pull request Jul 15, 2015
@schakrava schakrava mentioned this pull request Jul 31, 2015
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.

3 participants