test kernel for undefined rather than off

This commit is contained in:
Matthias BUSSONNIER 2012-05-03 07:37:52 +02:00
parent fc59441dda
commit 34deb138c8
2 changed files with 1 additions and 4 deletions

View File

@ -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

View File

@ -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();
}
};