-
Notifications
You must be signed in to change notification settings - Fork 138
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
Issue#706 websockets #724
Conversation
@@ -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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@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:-
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. |
That's a very good point @phillxnet. I am voting for 8001, since gunicorn runs next to it on 8000. |
8001 works with me. I'll make that change right now. |
…to issue#706-websockets
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.
…core into issue#706-websockets
…ockstor-core into gkadillak-issue#706-websockets
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).
…core into issue#706-websockets
Fixes #724 |
No description provided.