mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Merge pull request #5288 from minrk/start-idle
Correct initial state of kernel status indicator
This commit is contained in:
commit
05e6fbade4
@ -102,6 +102,16 @@ var IPython = (function (IPython) {
|
||||
$([IPython.events]).on('status_interrupting.Kernel',function () {
|
||||
knw.set_message("Interrupting kernel", 2000);
|
||||
});
|
||||
|
||||
// Start the kernel indicator in the busy state, and send a kernel_info request.
|
||||
// When the kernel_info reply arrives, the kernel is idle.
|
||||
$kernel_ind_icon.attr('class','icon-circle').attr('title','Kernel Busy');
|
||||
|
||||
$([IPython.events]).on('status_started.Kernel', function (evt, data) {
|
||||
data.kernel.kernel_info(function () {
|
||||
$([IPython.events]).trigger('status_idle.Kernel');
|
||||
});
|
||||
});
|
||||
|
||||
$([IPython.events]).on('status_dead.Kernel',function () {
|
||||
var msg = 'The kernel has died, and the automatic restart has failed.' +
|
||||
|
Loading…
Reference in New Issue
Block a user