Show More
@@ -77,7 +77,7 b' class SessionHandler(IPythonHandler):' | |||||
77 | kernel = km.kernel_model(kernel_id, self.ws_url) |
|
77 | kernel = km.kernel_model(kernel_id, self.ws_url) | |
78 | sm.delete_mapping_for_session(session_id) |
|
78 | sm.delete_mapping_for_session(session_id) | |
79 | model = sm.session_model(session_id, notebook_name, path, kernel) |
|
79 | model = sm.session_model(session_id, notebook_name, path, kernel) | |
80 | return model |
|
80 | self.finish(jsonapi.dumps(model)) | |
81 |
|
81 | |||
82 | @web.authenticated |
|
82 | @web.authenticated | |
83 | def delete(self, session_id): |
|
83 | def delete(self, session_id): | |
@@ -87,6 +87,8 b' class SessionHandler(IPythonHandler):' | |||||
87 | kernel_id = sm.get_kernel_from_session(session_id) |
|
87 | kernel_id = sm.get_kernel_from_session(session_id) | |
88 | km.shutdown_kernel(kernel_id) |
|
88 | km.shutdown_kernel(kernel_id) | |
89 | sm.delete_mapping_for_session(session_id) |
|
89 | sm.delete_mapping_for_session(session_id) | |
|
90 | self.set_status(204) | |||
|
91 | self.finish() | |||
90 |
|
92 | |||
91 |
|
93 | |||
92 | #----------------------------------------------------------------------------- |
|
94 | #----------------------------------------------------------------------------- |
@@ -103,12 +103,14 b' var IPython = (function (IPython) {' | |||||
103 | }; |
|
103 | }; | |
104 |
|
104 | |||
105 | NotebookList.prototype.load_sessions = function(){ |
|
105 | NotebookList.prototype.load_sessions = function(){ | |
|
106 | console.log("DID IT MAKE IT?"); | |||
|
107 | var that = this; | |||
106 | var settings = { |
|
108 | var settings = { | |
107 | processData : false, |
|
109 | processData : false, | |
108 | cache : false, |
|
110 | cache : false, | |
109 | type : "GET", |
|
111 | type : "GET", | |
110 | dataType : "json", |
|
112 | dataType : "json", | |
111 |
success : $.proxy(th |
|
113 | success : $.proxy(that.sessions_loaded, this) | |
112 | }; |
|
114 | }; | |
113 | var url = this.baseProjectUrl() + 'api/sessions'; |
|
115 | var url = this.baseProjectUrl() + 'api/sessions'; | |
114 | $.ajax(url,settings); |
|
116 | $.ajax(url,settings); | |
@@ -238,7 +240,7 b' var IPython = (function (IPython) {' | |||||
238 | cache : false, |
|
240 | cache : false, | |
239 | type : "DELETE", |
|
241 | type : "DELETE", | |
240 | dataType : "json", |
|
242 | dataType : "json", | |
241 |
success : function ( |
|
243 | success : function () { | |
242 | that.load_sessions(); |
|
244 | that.load_sessions(); | |
243 | } |
|
245 | } | |
244 | }; |
|
246 | }; | |
@@ -278,12 +280,7 b' var IPython = (function (IPython) {' | |||||
278 | parent_item.remove(); |
|
280 | parent_item.remove(); | |
279 | } |
|
281 | } | |
280 | }; |
|
282 | }; | |
281 | if (notebooklist.notebookPath() == "") { |
|
|||
282 | var url = notebooklist.baseProjectUrl() + 'api/notebooks/' + nbname +'.ipynb'; |
|
|||
283 | } |
|
|||
284 | else { |
|
|||
285 |
|
|
283 | var url = notebooklist.baseProjectUrl() + 'api/notebooks/' + notebooklist.notebookPath() + nbname + '.ipynb'; | |
286 | } |
|
|||
287 | $.ajax(url, settings); |
|
284 | $.ajax(url, settings); | |
288 | } |
|
285 | } | |
289 | }, |
|
286 | }, |
General Comments 0
You need to be logged in to leave comments.
Login now