Show More
@@ -124,6 +124,18 b' var IPython = (function (IPython) {' | |||
|
124 | 124 | that.select(index); |
|
125 | 125 | }); |
|
126 | 126 | |
|
127 | $([IPython.events]).on('status_autorestarting.Kernel', function () { | |
|
128 | IPython.dialog.modal({ | |
|
129 | title: "Kernel Restarting", | |
|
130 | body: "The kernel appears to have died. It will restart automatically.", | |
|
131 | buttons: { | |
|
132 | OK : { | |
|
133 | class : "btn-primary" | |
|
134 | } | |
|
135 | } | |
|
136 | }); | |
|
137 | }); | |
|
138 | ||
|
127 | 139 | |
|
128 | 140 | $(document).keydown(function (event) { |
|
129 | 141 | // console.log(event); |
@@ -448,6 +448,11 b' var IPython = (function (IPython) {' | |||
|
448 | 448 | } else if (content.execution_state === 'idle') { |
|
449 | 449 | $([IPython.events]).trigger('status_idle.Kernel', {kernel: this}); |
|
450 | 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 | 456 | $([IPython.events]).trigger('status_restarting.Kernel', {kernel: this}); |
|
452 | 457 | } else if (content.execution_state === 'dead') { |
|
453 | 458 | this.stop_channels(); |
General Comments 0
You need to be logged in to leave comments.
Login now