Show More
@@ -65,6 +65,7 b' from .services.kernels.kernelmanager import MappingKernelManager' | |||
|
65 | 65 | from .services.notebooks.nbmanager import NotebookManager |
|
66 | 66 | from .services.notebooks.filenbmanager import FileNotebookManager |
|
67 | 67 | from .services.clusters.clustermanager import ClusterManager |
|
68 | from .services.sessions.sessionmanager import SessionManager | |
|
68 | 69 | |
|
69 | 70 | from .base.handlers import AuthenticatedFileHandler, FileFindHandler |
|
70 | 71 | |
@@ -127,18 +128,18 b' def load_handlers(name):' | |||
|
127 | 128 | class NotebookWebApplication(web.Application): |
|
128 | 129 | |
|
129 | 130 | def __init__(self, ipython_app, kernel_manager, notebook_manager, |
|
130 | cluster_manager, log, | |
|
131 | cluster_manager, session_manager, log, | |
|
131 | 132 | base_project_url, settings_overrides): |
|
132 | 133 | |
|
133 | 134 | settings = self.init_settings( |
|
134 | 135 | ipython_app, kernel_manager, notebook_manager, cluster_manager, |
|
135 | log, base_project_url, settings_overrides) | |
|
136 | session_manager, log, base_project_url, settings_overrides) | |
|
136 | 137 | handlers = self.init_handlers(settings) |
|
137 | 138 | |
|
138 | 139 | super(NotebookWebApplication, self).__init__(handlers, **settings) |
|
139 | 140 | |
|
140 | 141 | def init_settings(self, ipython_app, kernel_manager, notebook_manager, |
|
141 | cluster_manager, log, | |
|
142 | cluster_manager, session_manager, log, | |
|
142 | 143 | base_project_url, settings_overrides): |
|
143 | 144 | # Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and |
|
144 | 145 | # base_project_url will always be unicode, which will in turn |
@@ -168,7 +169,8 b' class NotebookWebApplication(web.Application):' | |||
|
168 | 169 | kernel_manager=kernel_manager, |
|
169 | 170 | notebook_manager=notebook_manager, |
|
170 | 171 | cluster_manager=cluster_manager, |
|
171 | ||
|
172 | session_manager=session_manager, | |
|
173 | ||
|
172 | 174 | # IPython stuff |
|
173 | 175 | nbextensions_path = ipython_app.nbextensions_path, |
|
174 | 176 | mathjax_url=ipython_app.mathjax_url, |
@@ -192,6 +194,7 b' class NotebookWebApplication(web.Application):' | |||
|
192 | 194 | handlers.extend(load_handlers('services.kernels.handlers')) |
|
193 | 195 | handlers.extend(load_handlers('services.notebooks.handlers')) |
|
194 | 196 | handlers.extend(load_handlers('services.clusters.handlers')) |
|
197 | handlers.extend(load_handlers('services.sessions.handlers')) | |
|
195 | 198 | handlers.extend([ |
|
196 | 199 | (r"/files/(.*)", AuthenticatedFileHandler, {'path' : settings['notebook_manager'].notebook_dir}), |
|
197 | 200 | (r"/nbextensions/(.*)", FileFindHandler, {'path' : settings['nbextensions_path']}), |
@@ -523,7 +526,8 b' class NotebookApp(BaseIPythonApplication):' | |||
|
523 | 526 | ) |
|
524 | 527 | kls = import_item(self.notebook_manager_class) |
|
525 | 528 | self.notebook_manager = kls(parent=self, log=self.log) |
|
526 | self.notebook_manager.load_notebook_names() | |
|
529 | self.notebook_manager.load_notebook_names('') | |
|
530 | self.session_manager = SessionManager(parent=self, log=self.log) | |
|
527 | 531 | self.cluster_manager = ClusterManager(parent=self, log=self.log) |
|
528 | 532 | self.cluster_manager.update_profiles() |
|
529 | 533 | |
@@ -540,9 +544,9 b' class NotebookApp(BaseIPythonApplication):' | |||
|
540 | 544 | def init_webapp(self): |
|
541 | 545 | """initialize tornado webapp and httpserver""" |
|
542 | 546 | self.web_app = NotebookWebApplication( |
|
543 | self, self.kernel_manager, self.notebook_manager, | |
|
544 | self.cluster_manager, self.log, | |
|
545 |
self.base_project_url, self.webapp_settings |
|
|
547 | self, self.kernel_manager, self.notebook_manager, | |
|
548 | self.cluster_manager, self.session_manager, self.log, | |
|
549 | self.base_project_url, self.webapp_settings | |
|
546 | 550 | ) |
|
547 | 551 | if self.certfile: |
|
548 | 552 | ssl_options = dict(certfile=self.certfile) |
General Comments 0
You need to be logged in to leave comments.
Login now