mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Use existing IPython method to kill kernels.
This commit is contained in:
parent
b566c71dfd
commit
dead20b1bd
@ -16,12 +16,7 @@ casper.openNewNotebook = function () {
|
||||
// Shut down the current notebook's kernel.
|
||||
casper.shutdownCurrentKernel = function () {
|
||||
this.thenEvaluate(function() {
|
||||
var baseUrl = $('body').data('baseProjectUrl');
|
||||
var kernelId = IPython.notebook.kernel.kernel_id;
|
||||
var url = baseUrl + 'kernels/' + kernelId;
|
||||
$.ajax(url, {
|
||||
type: 'DELETE',
|
||||
});
|
||||
IPython.notebook.kernel.kill();
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user