Show More
@@ -86,6 +86,18 b' var IPython = (function (IPython) {' | |||||
86 | IPython.save_widget.update_document_title(); |
|
86 | IPython.save_widget.update_document_title(); | |
87 | knw.set_message("Restarting kernel", 2000); |
|
87 | knw.set_message("Restarting kernel", 2000); | |
88 | }); |
|
88 | }); | |
|
89 | ||||
|
90 | $([IPython.events]).on('status_autorestarting.Kernel',function () { | |||
|
91 | IPython.dialog.modal({ | |||
|
92 | title: "Kernel Restarting", | |||
|
93 | body: "The kernel appears to have died. It is being restarted.", | |||
|
94 | buttons: { | |||
|
95 | OK : { | |||
|
96 | class : "btn-primary" | |||
|
97 | } | |||
|
98 | } | |||
|
99 | }); | |||
|
100 | }); | |||
89 |
|
101 | |||
90 | $([IPython.events]).on('status_interrupting.Kernel',function () { |
|
102 | $([IPython.events]).on('status_interrupting.Kernel',function () { | |
91 | knw.set_message("Interrupting kernel"); |
|
103 | knw.set_message("Interrupting kernel"); |
@@ -448,6 +448,11 b' var IPython = (function (IPython) {' | |||||
448 | } else if (content.execution_state === 'idle') { |
|
448 | } else if (content.execution_state === 'idle') { | |
449 | $([IPython.events]).trigger('status_idle.Kernel', {kernel: this}); |
|
449 | $([IPython.events]).trigger('status_idle.Kernel', {kernel: this}); | |
450 | } else if (content.execution_state === 'restarting') { |
|
450 | } else if (content.execution_state === 'restarting') { | |
|
451 | // autorestarting is distinct from restarting, | |||
|
452 | // in that it means the kernel died and the server is restarting it. | |||
|
453 | // status_restarting sets the notification widget, | |||
|
454 | // autorestart shows the more prominent dialog. | |||
|
455 | $([IPython.events]).trigger('status_autorestarting.Kernel', {kernel: this}); | |||
451 | $([IPython.events]).trigger('status_restarting.Kernel', {kernel: this}); |
|
456 | $([IPython.events]).trigger('status_restarting.Kernel', {kernel: this}); | |
452 | } else if (content.execution_state === 'dead') { |
|
457 | } else if (content.execution_state === 'dead') { | |
453 | this.stop_channels(); |
|
458 | this.stop_channels(); |
General Comments 0
You need to be logged in to leave comments.
Login now