Show More
@@ -590,8 +590,19 b' class NotebookRootHandler(AuthenticatedHandler):' | |||||
590 | @authenticate_unless_readonly |
|
590 | @authenticate_unless_readonly | |
591 | def get(self): |
|
591 | def get(self): | |
592 | nbm = self.application.notebook_manager |
|
592 | nbm = self.application.notebook_manager | |
|
593 | km = self.application.kernel_manager | |||
593 | files = nbm.list_notebooks() |
|
594 | files = nbm.list_notebooks() | |
594 | self.finish(jsonapi.dumps(files)) |
|
595 | #kernel_for_notebook | |
|
596 | nlist=[] | |||
|
597 | for f in files : | |||
|
598 | nid = f['notebook_id'] | |||
|
599 | if km.kernel_for_notebook(nid) is not None: | |||
|
600 | f['kernel_status']='on' | |||
|
601 | else: | |||
|
602 | f['kernel_status']='off' | |||
|
603 | nlist.append(f) | |||
|
604 | print(files) | |||
|
605 | self.finish(jsonapi.dumps(nlist)) | |||
595 |
|
606 | |||
596 | @web.authenticated |
|
607 | @web.authenticated | |
597 | def post(self): |
|
608 | def post(self): |
General Comments 0
You need to be logged in to leave comments.
Login now