Show More
@@ -94,8 +94,8 b' define([' | |||||
94 | that.send_input_reply(data); |
|
94 | that.send_input_reply(data); | |
95 | }); |
|
95 | }); | |
96 |
|
96 | |||
97 | var record_status = function (evt) { |
|
97 | var record_status = function (evt, info) { | |
98 |
console.log('Kernel: ' + evt.type + ' (' + |
|
98 | console.log('Kernel: ' + evt.type + ' (' + info.kernel.id + ')'); | |
99 | }; |
|
99 | }; | |
100 |
|
100 | |||
101 | this.events.on('kernel_created.Kernel', record_status); |
|
101 | this.events.on('kernel_created.Kernel', record_status); | |
@@ -397,7 +397,7 b' define([' | |||||
397 | // get kernel info so we know what state the kernel is in |
|
397 | // get kernel info so we know what state the kernel is in | |
398 | var that = this; |
|
398 | var that = this; | |
399 | this.kernel_info(function () { |
|
399 | this.kernel_info(function () { | |
400 |
that.events.trigger('kernel_ready.Kernel', {kernel: th |
|
400 | that.events.trigger('kernel_ready.Kernel', {kernel: that}); | |
401 | }); |
|
401 | }); | |
402 | }; |
|
402 | }; | |
403 |
|
403 | |||
@@ -451,7 +451,7 b' define([' | |||||
451 | that.get_info(function () { |
|
451 | that.get_info(function () { | |
452 | that._ws_closed(ws_host_url, false); |
|
452 | that._ws_closed(ws_host_url, false); | |
453 | }, function () { |
|
453 | }, function () { | |
454 |
that.events.trigger('kernel_dead.Kernel', {kernel: th |
|
454 | that.events.trigger('kernel_dead.Kernel', {kernel: that}); | |
455 | that._kernel_dead(); |
|
455 | that._kernel_dead(); | |
456 | }); |
|
456 | }); | |
457 | } |
|
457 | } | |
@@ -539,7 +539,7 b' define([' | |||||
539 | var that = this; |
|
539 | var that = this; | |
540 | var close = function (c) { |
|
540 | var close = function (c) { | |
541 | return function () { |
|
541 | return function () { | |
542 | if (that.channels[c].readyState === WebSocket.CLOSED) { |
|
542 | if (that.channels[c] && that.channels[c].readyState === WebSocket.CLOSED) { | |
543 | that.channels[c] = null; |
|
543 | that.channels[c] = null; | |
544 | } |
|
544 | } | |
545 | }; |
|
545 | }; |
@@ -50,8 +50,8 b' define([' | |||||
50 |
|
50 | |||
51 | Session.prototype.bind_events = function () { |
|
51 | Session.prototype.bind_events = function () { | |
52 | var that = this; |
|
52 | var that = this; | |
53 | var record_status = function (evt) { |
|
53 | var record_status = function (evt, info) { | |
54 |
console.log('Session: ' + evt.type + ' (' + |
|
54 | console.log('Session: ' + evt.type + ' (' + info.session.id + ')'); | |
55 | }; |
|
55 | }; | |
56 |
|
56 | |||
57 | this.events.on('kernel_created.Session', record_status); |
|
57 | this.events.on('kernel_created.Session', record_status); |
General Comments 0
You need to be logged in to leave comments.
Login now