Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
|
@ -0,0 +1,48 @@
|
|||
// Copyright (c) Jupyter Development Team.
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
define([
|
||||
'jquery',
|
||||
'base/js/dialog',
|
||||
'base/js/i18n',
|
||||
'base/js/utils'
|
||||
], function(
|
||||
$,
|
||||
dialog,
|
||||
i18n,
|
||||
utils
|
||||
){
|
||||
"use strict";
|
||||
|
||||
function display_shutdown_dialog() {
|
||||
var body = $('<div/>').append(
|
||||
$('<p/>').text(i18n.msg._("You have shut down Jupyter. You can now close this tab."))
|
||||
).append(
|
||||
$('<p/>').text(i18n.msg._("To use Jupyter again, you will need to relaunch it."))
|
||||
);
|
||||
|
||||
dialog.modal({
|
||||
title: i18n.msg._("Server stopped"),
|
||||
body: body
|
||||
})
|
||||
}
|
||||
|
||||
function activate() {
|
||||
// Add shutdown button
|
||||
$("button#shutdown").click(function () {
|
||||
utils.ajax(utils.url_path_join(
|
||||
utils.get_body_data("baseUrl"),
|
||||
"api",
|
||||
"shutdown"
|
||||
), {
|
||||
type: "POST",
|
||||
success: display_shutdown_dialog,
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return {activate: activate}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue