diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 05eab03..5388e3f 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -123,6 +123,18 @@ var IPython = (function (IPython) { var index = that.find_cell_index(data.cell); that.select(index); }); + + $([IPython.events]).on('status_autorestarting.Kernel', function () { + IPython.dialog.modal({ + title: "Kernel Restarting", + body: "The kernel appears to have died. It will restart automatically.", + buttons: { + OK : { + class : "btn-primary" + } + } + }); + }); $(document).keydown(function (event) { diff --git a/IPython/html/static/services/kernels/js/kernel.js b/IPython/html/static/services/kernels/js/kernel.js index ef7adb4..98d744c 100644 --- a/IPython/html/static/services/kernels/js/kernel.js +++ b/IPython/html/static/services/kernels/js/kernel.js @@ -448,6 +448,11 @@ var IPython = (function (IPython) { } else if (content.execution_state === 'idle') { $([IPython.events]).trigger('status_idle.Kernel', {kernel: this}); } else if (content.execution_state === 'restarting') { + // autorestarting is distinct from restarting, + // in that it means the kernel died and the server is restarting it. + // status_restarting sets the notification widget, + // autorestart shows the more prominent dialog. + $([IPython.events]).trigger('status_autorestarting.Kernel', {kernel: this}); $([IPython.events]).trigger('status_restarting.Kernel', {kernel: this}); } else if (content.execution_state === 'dead') { this.stop_channels();