diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index 67874e793..b4f2ba625 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -75,18 +75,18 @@ define(function(require){ env.notebook.show_shortcuts_editor(); } }, - 'halt-kernel': { - help: 'Halt the kernel (no confirmation dialog)', + 'shutdown-kernel': { + help: 'Shutdownthe kernel (no confirmation dialog)', handler: function (env) { - env.notebook.halt_kernel({confirm: false}); + env.notebook.shutdown_kernel({confirm: false}); } }, - 'confirm-halt-kernel':{ + 'confirm-shutdown-kernel':{ icon: 'fa-repeat', help_index : 'hb', help: 'Shutdown the kernel (with confirmation dialog)', handler : function (env) { - env.notebook.halt_kernel(); + env.notebook.shutdown_kernel(); } }, 'restart-kernel': { diff --git a/notebook/static/notebook/js/menubar.js b/notebook/static/notebook/js/menubar.js index 1b4ebb05e..5fd7511b5 100644 --- a/notebook/static/notebook/js/menubar.js +++ b/notebook/static/notebook/js/menubar.js @@ -250,7 +250,7 @@ define([ '#rename_notebook' : 'rename-notebook', '#find_and_replace' : 'find-and-replace', '#save_checkpoint': 'save-notebook', - '#halt_kernel': 'confirm-halt-kernel', + '#shutdown_kernel': 'confirm-shutdown-kernel', '#restart_kernel': 'confirm-restart-kernel', '#restart_clear_output': 'confirm-restart-kernel-and-clear-output', '#restart_run_all': 'confirm-restart-kernel-and-run-all-cells', diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 019e08b3e..31bcbef51 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -2262,26 +2262,26 @@ define([ * Prompt the user to restart the kernel. * if options.confirm === false, no confirmation dialog is shown. */ - Notebook.prototype.halt_kernel = function (options) { + Notebook.prototype.shutdown_kernel = function (options) { var that = this; - var halt_options = {}; - halt_options.confirm = (options || {}).confirm; - halt_options.dialog = { - title : "Halt kernel?", + var shutdown_options = {}; + shutdown_options.confirm = (options || {}).confirm; + shutdown_options.dialog = { + title : "Shutdown kernel?", body : $("

").text( - 'Do you want to halt the current kernel? All variables will be lost.' + 'Do you want to shutdown the current kernel? All variables will be lost.' ), buttons : { - "Halt" : { + "Shutdown" : { "class" : "btn-danger", "click" : function () {}, }, } }; - halt_options.kernel_action = function() { + shutdown_options.kernel_action = function() { that.session.delete(); }; - return this._restart_kernel(halt_options); + return this._restart_kernel(shutdown_options); }; Notebook.prototype.restart_kernel = function (options) { diff --git a/notebook/templates/notebook.html b/notebook/templates/notebook.html index 47836fa09..1a73af6cf 100644 --- a/notebook/templates/notebook.html +++ b/notebook/templates/notebook.html @@ -270,7 +270,7 @@ data-notebook-path="{{notebook_path | urlencode}}" title="Reconnect to the Kernel"> Reconnect -

  • Shutdown
  • diff --git a/notebook/tests/notebook/kernel_menu.js b/notebook/tests/notebook/kernel_menu.js index a465be1e0..f4db96cab 100644 --- a/notebook/tests/notebook/kernel_menu.js +++ b/notebook/tests/notebook/kernel_menu.js @@ -2,7 +2,7 @@ casper.notebook_test(function () { var that = this; - var menuItems = ['#restart_kernel', '#restart_clear_output', '#restart_run_all', '#halt_kernel'] + var menuItems = ['#restart_kernel', '#restart_clear_output', '#restart_run_all', '#shutdown_kernel'] var cancelSelector = ".modal-footer button:first-of-type" menuItems.forEach( function(selector) { @@ -15,11 +15,11 @@ casper.notebook_test(function () { }); }); - var haltSelector = menuItems.pop(); + var shutdownSelector = menuItems.pop(); var confirmSelector = ".modal-footer .btn-danger" menuItems.forEach( function(selector) { - that.thenClick(haltSelector); + that.thenClick(shutdownSelector); that.waitForSelector(confirmSelector); that.thenClick(confirmSelector); @@ -36,7 +36,7 @@ casper.notebook_test(function () { return IPython.notebook.kernel.is_connected() === true; })}); that.then(function() { - that.test.assert(true, "no confirmation for " + selector + " after session halted") + that.test.assert(true, "no confirmation for " + selector + " after session shutdown") }) });