From 34deb138c8f48bffe54adddd5f99febb9e8c1afe Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Thu, 3 May 2012 07:37:52 +0200 Subject: [PATCH] test kernel for undefined rather than off --- IPython/frontend/html/notebook/handlers.py | 2 -- IPython/frontend/html/notebook/static/js/notebooklist.js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index 9928b06bc..120ec2879 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -597,8 +597,6 @@ class NotebookRootHandler(AuthenticatedHandler): kid = km.kernel_for_notebook(nid) if kid is not None: f['kernel_status']=kid - else: - f['kernel_status']='off' self.finish(jsonapi.dumps(files)) @web.authenticated diff --git a/IPython/frontend/html/notebook/static/js/notebooklist.js b/IPython/frontend/html/notebook/static/js/notebooklist.js index a3ec6e72d..75c72df7f 100644 --- a/IPython/frontend/html/notebook/static/js/notebooklist.js +++ b/IPython/frontend/html/notebook/static/js/notebooklist.js @@ -113,7 +113,7 @@ var IPython = (function (IPython) { this.add_link(notebook_id, nbname, item); if (!IPython.read_only){ // hide delete buttons when readonly - if(kernel == 'off'){ + if(kernel == undefined){ this.add_delete_button(item); } else { this.add_shutdown_button(item,kernel); @@ -192,7 +192,6 @@ var IPython = (function (IPython) { type : "DELETE", dataType : "json", success : function (data, status, xhr) { - console.log('kernel killed'); that.load_list(); } };