mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +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.
|
// Shut down the current notebook's kernel.
|
||||||
casper.shutdownCurrentKernel = function () {
|
casper.shutdownCurrentKernel = function () {
|
||||||
this.thenEvaluate(function() {
|
this.thenEvaluate(function() {
|
||||||
var baseUrl = $('body').data('baseProjectUrl');
|
IPython.notebook.kernel.kill();
|
||||||
var kernelId = IPython.notebook.kernel.kernel_id;
|
|
||||||
var url = baseUrl + 'kernels/' + kernelId;
|
|
||||||
$.ajax(url, {
|
|
||||||
type: 'DELETE',
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user