##// END OF EJS Templates
fixed shutdown button refresh on dashboard
Zachary Sailer -
Show More
@@ -77,7 +77,7 b' class SessionHandler(IPythonHandler):'
77 77 kernel = km.kernel_model(kernel_id, self.ws_url)
78 78 sm.delete_mapping_for_session(session_id)
79 79 model = sm.session_model(session_id, notebook_name, path, kernel)
80 return model
80 self.finish(jsonapi.dumps(model))
81 81
82 82 @web.authenticated
83 83 def delete(self, session_id):
@@ -87,6 +87,8 b' class SessionHandler(IPythonHandler):'
87 87 kernel_id = sm.get_kernel_from_session(session_id)
88 88 km.shutdown_kernel(kernel_id)
89 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 105 NotebookList.prototype.load_sessions = function(){
106 console.log("DID IT MAKE IT?");
107 var that = this;
106 108 var settings = {
107 109 processData : false,
108 110 cache : false,
109 111 type : "GET",
110 112 dataType : "json",
111 success : $.proxy(this.sessions_loaded, this)
113 success : $.proxy(that.sessions_loaded, this)
112 114 };
113 115 var url = this.baseProjectUrl() + 'api/sessions';
114 116 $.ajax(url,settings);
@@ -238,7 +240,7 b' var IPython = (function (IPython) {'
238 240 cache : false,
239 241 type : "DELETE",
240 242 dataType : "json",
241 success : function (data, status, xhr) {
243 success : function () {
242 244 that.load_sessions();
243 245 }
244 246 };
@@ -278,12 +280,7 b' var IPython = (function (IPython) {'
278 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 284 $.ajax(url, settings);
288 285 }
289 286 },
General Comments 0
You need to be logged in to leave comments. Login now