Skip to content

Commit 7ed5b1f

Browse files
committed
Merge pull request #1123 from ElDeveloper/moi-bug
BUG: Fix bug in moi.init
2 parents 33e5404 + 9cdc4c5 commit 7ed5b1f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

qiita_pet/static/vendor/js/moi.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ var moi = new function () {
6666
* websocket. On construction, this method will send a message over the
6767
* socket to get all known job information associated with this client.
6868
*
69-
* @param {host} The URL for the websocket, minus the ws:// header, or null
70-
* to use the default moi-ws.
7169
* @param {group_id} A group ID to get initial data from, or null to fetch
7270
* all records associated with the user.
71+
* @param {host} The URL for the websocket, minus the ws:// header, or null
72+
* to use the default moi-ws.
7373
* @param {on_open} Optional function for action when websocket is opened.
7474
* @param {on_close} Optional function for action when websocket is closed.
7575
* @param {on_error} Optional function for action when websocket errors.
7676
*/
77-
this.init = function(host, group_id, on_open, on_close, on_error) {
77+
this.init = function(group_id, host, on_open, on_close, on_error) {
7878
host = host || window.location.host + '/moi-ws/';
7979
if (!("WebSocket" in window)) {
8080
alert("Your browser does not appear to support websockets!");

qiita_pet/templates/analysis_selected.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
check_color();
5959
}
6060
$(document).ready(function() {
61-
moi.init(window.location.host + '/analysis/selected/socket/', null, function(){}, error, error);
61+
moi.init(null, window.location.host + '/analysis/selected/socket/', function(){}, error, error);
6262
moi.add_callback('remove_pd', remove_pd_from_html);
6363
moi.add_callback('remove_sample', remove_sample_from_html);
6464
moi.add_callback('clear', clear_from_html);

qiita_pet/templates/list_studies.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
}
5656

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

0 commit comments

Comments
 (0)