Show More
@@ -74,7 +74,7 b' class NotebookRedirectHandler(IPythonHandler):' | |||||
74 |
|
74 | |||
75 |
|
75 | |||
76 | default_handlers = [ |
|
76 | default_handlers = [ | |
77 |
(r"/notebooks |
|
77 | (r"/notebooks%s" % _notebook_path_regex, NotebookHandler), | |
78 |
(r"/notebooks |
|
78 | (r"/notebooks%s" % _path_regex, NotebookRedirectHandler), | |
79 | ] |
|
79 | ] | |
80 |
|
80 |
@@ -229,18 +229,18 b' class ModifyNotebookCheckpointsHandler(IPythonHandler):' | |||||
229 | #----------------------------------------------------------------------------- |
|
229 | #----------------------------------------------------------------------------- | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | _path_regex = r"(?P<path>.*)" |
|
232 | _path_regex = r"(?P<path>(?:/.*)*)" | |
233 | _checkpoint_id_regex = r"(?P<checkpoint_id>[\w-]+)" |
|
233 | _checkpoint_id_regex = r"(?P<checkpoint_id>[\w-]+)" | |
234 | _notebook_name_regex = r"(?P<name>[^/]+\.ipynb)" |
|
234 | _notebook_name_regex = r"(?P<name>[^/]+\.ipynb)" | |
235 | _notebook_path_regex = "%s/%s" % (_path_regex, _notebook_name_regex) |
|
235 | _notebook_path_regex = "%s/%s" % (_path_regex, _notebook_name_regex) | |
236 |
|
236 | |||
237 | default_handlers = [ |
|
237 | default_handlers = [ | |
238 |
(r"/api/notebooks |
|
238 | (r"/api/notebooks%s/copy" % _notebook_path_regex, NotebookCopyHandler), | |
239 |
(r"/api/notebooks |
|
239 | (r"/api/notebooks%s/checkpoints" % _notebook_path_regex, NotebookCheckpointsHandler), | |
240 |
(r"/api/notebooks |
|
240 | (r"/api/notebooks%s/checkpoints/%s" % (_notebook_path_regex, _checkpoint_id_regex), | |
241 | ModifyNotebookCheckpointsHandler), |
|
241 | ModifyNotebookCheckpointsHandler), | |
242 |
(r"/api/notebooks |
|
242 | (r"/api/notebooks%s" % _notebook_path_regex, NotebookHandler), | |
243 |
(r"/api/notebooks |
|
243 | (r"/api/notebooks%s" % _path_regex, NotebookHandler), | |
244 | ] |
|
244 | ] | |
245 |
|
245 | |||
246 |
|
246 |
@@ -64,10 +64,8 b' class TreeRedirectHandler(IPythonHandler):' | |||||
64 |
|
64 | |||
65 |
|
65 | |||
66 | default_handlers = [ |
|
66 | default_handlers = [ | |
67 | (r"/tree/(.*)/", TreeRedirectHandler), |
|
67 | (r"/tree%s" % _notebook_path_regex, TreeHandler), | |
68 |
(r"/tree |
|
68 | (r"/tree%s" % _path_regex, TreeHandler), | |
69 | (r"/tree/?%s" % _path_regex, TreeHandler), |
|
|||
70 | (r"/tree/", TreeRedirectHandler), |
|
|||
71 | (r"/tree", TreeHandler), |
|
69 | (r"/tree", TreeHandler), | |
72 | (r"/", TreeRedirectHandler), |
|
70 | (r"/", TreeRedirectHandler), | |
73 | ] |
|
71 | ] |
General Comments 0
You need to be logged in to leave comments.
Login now