Merge pull request #5288 from minrk/start-idle

Correct initial state of kernel status indicator
This commit is contained in:
Brian E. Granger 2014-03-07 14:07:42 -08:00
commit 05e6fbade4

View File

@ -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.' +