diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index 9211ed1fd..167aa232a 100644 --- a/IPython/html/static/notebook/js/notificationarea.js +++ b/IPython/html/static/notebook/js/notificationarea.js @@ -163,13 +163,13 @@ define([ }); }); - this.events.on('status_dead.Kernel',function () { + this.events.on('no_kernel.Kernel', function () { that.save_widget.update_document_title(); knw.danger("Dead kernel"); $kernel_ind_icon.attr('class','kernel_dead_icon').attr('title','Kernel Dead'); }); - this.events.on('status_dead.Kernel',function () { + this.events.on('status_dead.Kernel', function () { var msg = 'The kernel has died, and the automatic restart has failed.' + ' It is possible the kernel cannot be restarted.' + ' If you are not able to restart the kernel, you will still be able to save' + diff --git a/IPython/html/static/services/kernels/js/kernel.js b/IPython/html/static/services/kernels/js/kernel.js index 020835e90..9f528e9c6 100644 --- a/IPython/html/static/services/kernels/js/kernel.js +++ b/IPython/html/static/services/kernels/js/kernel.js @@ -268,6 +268,7 @@ define([ Kernel.prototype._kernel_dead = function () { this.events.trigger('status_dead.Kernel'); + this.events.trigger('no_kernel.Kernel'); this.stop_channels(); }; @@ -693,6 +694,7 @@ define([ if (execution_state === 'busy') { this.events.trigger('status_busy.Kernel', {kernel: this}); + } else if (execution_state === 'idle') { // signal that iopub callbacks are (probably) done // async output may still arrive, @@ -701,6 +703,7 @@ define([ // trigger status_idle event this.events.trigger('status_idle.Kernel', {kernel: this}); + } else if (execution_state === 'restarting') { // autorestarting is distinct from restarting, // in that it means the kernel died and the server is restarting it. @@ -708,10 +711,9 @@ define([ // autorestart shows the more prominent dialog. this.events.trigger('status_autorestarting.Kernel', {kernel: this}); this.events.trigger('status_restarting.Kernel', {kernel: this}); + } else if (execution_state === 'dead') { - this.stop_channels(); - this.events.trigger('status_dead.Kernel', {kernel: this}); - this.events.trigger('status_restart_failed.Kernel', {kernel: this}); + this._kernel_dead(); } }; diff --git a/IPython/html/static/services/sessions/js/session.js b/IPython/html/static/services/sessions/js/session.js index dc41e875b..579939c50 100644 --- a/IPython/html/static/services/sessions/js/session.js +++ b/IPython/html/static/services/sessions/js/session.js @@ -64,7 +64,7 @@ define([ } }; var on_error = function (xhr, status, err) { - that.events.trigger('status_dead.Kernel'); + that.events.trigger('no_kernel.Kernel'); if (error) { error(xhr, status, err); }