Show More
@@ -680,14 +680,14 b' class NotebookHandler(IPythonHandler):' | |||||
680 | self.finish() |
|
680 | self.finish() | |
681 |
|
681 | |||
682 |
|
682 | |||
683 |
class NotebookCheckpointsHandler( |
|
683 | class NotebookCheckpointsHandler(IPythonHandler): | |
684 |
|
684 | |||
685 | SUPPORTED_METHODS = ('GET', 'POST') |
|
685 | SUPPORTED_METHODS = ('GET', 'POST') | |
686 |
|
686 | |||
687 | @web.authenticated |
|
687 | @web.authenticated | |
688 | def get(self, notebook_id): |
|
688 | def get(self, notebook_id): | |
689 | """get lists checkpoints for a notebook""" |
|
689 | """get lists checkpoints for a notebook""" | |
690 |
nbm = self. |
|
690 | nbm = self.notebook_manager | |
691 | checkpoints = nbm.list_checkpoints(notebook_id) |
|
691 | checkpoints = nbm.list_checkpoints(notebook_id) | |
692 | data = jsonapi.dumps(checkpoints, default=date_default) |
|
692 | data = jsonapi.dumps(checkpoints, default=date_default) | |
693 | self.finish(data) |
|
693 | self.finish(data) | |
@@ -695,20 +695,21 b' class NotebookCheckpointsHandler(AuthenticatedHandler):' | |||||
695 | @web.authenticated |
|
695 | @web.authenticated | |
696 | def post(self, notebook_id): |
|
696 | def post(self, notebook_id): | |
697 | """post creates a new checkpoint""" |
|
697 | """post creates a new checkpoint""" | |
698 |
nbm = self. |
|
698 | nbm = self.notebook_manager | |
699 | checkpoint = nbm.create_checkpoint(notebook_id) |
|
699 | checkpoint = nbm.create_checkpoint(notebook_id) | |
700 | data = jsonapi.dumps(checkpoint, default=date_default) |
|
700 | data = jsonapi.dumps(checkpoint, default=date_default) | |
|
701 | ||||
701 | self.finish(data) |
|
702 | self.finish(data) | |
702 |
|
703 | |||
703 |
|
704 | |||
704 |
class ModifyNotebookCheckpointsHandler( |
|
705 | class ModifyNotebookCheckpointsHandler(IPythonHandler): | |
705 |
|
706 | |||
706 | SUPPORTED_METHODS = ('POST', 'DELETE') |
|
707 | SUPPORTED_METHODS = ('POST', 'DELETE') | |
707 |
|
708 | |||
708 | @web.authenticated |
|
709 | @web.authenticated | |
709 | def post(self, notebook_id, checkpoint_id): |
|
710 | def post(self, notebook_id, checkpoint_id): | |
710 | """post restores a notebook from a checkpoint""" |
|
711 | """post restores a notebook from a checkpoint""" | |
711 |
nbm = self. |
|
712 | nbm = self.notebook_manager | |
712 | nbm.restore_checkpoint(notebook_id, checkpoint_id) |
|
713 | nbm.restore_checkpoint(notebook_id, checkpoint_id) | |
713 | self.set_status(204) |
|
714 | self.set_status(204) | |
714 | self.finish() |
|
715 | self.finish() | |
@@ -716,13 +717,12 b' class ModifyNotebookCheckpointsHandler(AuthenticatedHandler):' | |||||
716 | @web.authenticated |
|
717 | @web.authenticated | |
717 | def delete(self, notebook_id, checkpoint_id): |
|
718 | def delete(self, notebook_id, checkpoint_id): | |
718 | """delete clears a checkpoint for a given notebook""" |
|
719 | """delete clears a checkpoint for a given notebook""" | |
719 |
nbm = self. |
|
720 | nbm = self.notebook_manager | |
720 | nbm.delte_checkpoint(notebook_id, checkpoint_id) |
|
721 | nbm.delte_checkpoint(notebook_id, checkpoint_id) | |
721 | self.set_status(204) |
|
722 | self.set_status(204) | |
722 | self.finish() |
|
723 | self.finish() | |
723 |
|
724 | |||
724 |
|
725 | |||
725 |
|
||||
726 | class NotebookCopyHandler(IPythonHandler): |
|
726 | class NotebookCopyHandler(IPythonHandler): | |
727 |
|
727 | |||
728 | @web.authenticated |
|
728 | @web.authenticated |
General Comments 0
You need to be logged in to leave comments.
Login now