mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
Adding back kernel dead choice for user.
I had removed the choice for the user to not restart a dead kernel but we are using that elsewhere. Eventually we may not give them a choice, but for now we will use that model.
This commit is contained in:
parent
ae2bea23fa
commit
b274a86b8c
@ -54,17 +54,21 @@ var IPython = (function (IPython) {
|
||||
that.set_message("Interrupting kernel",500);
|
||||
});
|
||||
$([IPython.events]).on('status_dead.Kernel',function () {
|
||||
IPython.notebook.start_kernel();
|
||||
that.set_message("Restarting kernel",500);
|
||||
IPython.notebook.kernel.stop_channels();
|
||||
var dialog = $('<div/>');
|
||||
dialog.html('The kernel has died and is being restarted.');
|
||||
dialog.html('The kernel has died, would you like to restart it? If you do not restart the kernel, you will be able to save the notebook, but running code will not work until the notebook is reopened.');
|
||||
$(document).append(dialog);
|
||||
dialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
title: "Dead kernel",
|
||||
buttons : {
|
||||
"OK": function () {
|
||||
"Restart": function () {
|
||||
that.set_message("Restarting kernel",500);
|
||||
IPython.notebook.start_kernel();
|
||||
$(this).dialog('close');
|
||||
},
|
||||
"Continue running": function () {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user