Skip to content

BUG: Fix bug in moi.init #1123

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

Merged
merged 2 commits into from
Apr 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qiita_pet/static/vendor/js/moi.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ var moi = new function () {
* websocket. On construction, this method will send a message over the
* socket to get all known job information associated with this client.
*
* @param {host} The URL for the websocket, minus the ws:// header, or null
* to use the default moi-ws.
* @param {group_id} A group ID to get initial data from, or null to fetch
* all records associated with the user.
* @param {host} The URL for the websocket, minus the ws:// header, or null
* to use the default moi-ws.
* @param {on_open} Optional function for action when websocket is opened.
* @param {on_close} Optional function for action when websocket is closed.
* @param {on_error} Optional function for action when websocket errors.
*/
this.init = function(host, group_id, on_open, on_close, on_error) {
this.init = function(group_id, host, on_open, on_close, on_error) {
host = host || window.location.host + '/moi-ws/';
if (!("WebSocket" in window)) {
alert("Your browser does not appear to support websockets!");
Expand Down
2 changes: 1 addition & 1 deletion qiita_pet/templates/analysis_selected.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
check_color();
}
$(document).ready(function() {
moi.init(window.location.host + '/analysis/selected/socket/', null, function(){}, error, error);
moi.init(null, window.location.host + '/analysis/selected/socket/', function(){}, error, error);
moi.add_callback('remove_pd', remove_pd_from_html);
moi.add_callback('remove_sample', remove_sample_from_html);
moi.add_callback('clear', clear_from_html);
Expand Down
2 changes: 1 addition & 1 deletion qiita_pet/templates/list_studies.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}

$(document).ready(function() {
moi.init(window.location.host + '/study/list/socket/', null, function(){}, error, error);
moi.init(null, window.location.host + '/study/list/socket/', function(){}, error, error);
moi.add_callback('sel', show_alert);
function format ( d, row ) {
// `d` is the original data object for the row
Expand Down