mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 21:43:01 +00:00
add Shutdown Hub button to Admin page
with dialog and checkboxes for cleaning up servers and/or proxy
This commit is contained in:
@@ -10,7 +10,7 @@ define(['jquery', 'utils'], function ($, utils) {
|
||||
|
||||
var default_options = {
|
||||
type: 'GET',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
contentType: "application/json",
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
processData: false,
|
||||
@@ -122,5 +122,14 @@ define(['jquery', 'utils'], function ($, utils) {
|
||||
);
|
||||
};
|
||||
|
||||
JHAPI.prototype.shutdown_hub = function (data, options) {
|
||||
options = options || {};
|
||||
options = update(options, {type: 'POST'});
|
||||
if (data) {
|
||||
options.data = JSON.stringify(data);
|
||||
}
|
||||
this.api_request('shutdown', options);
|
||||
};
|
||||
|
||||
return JHAPI;
|
||||
});
|
Reference in New Issue
Block a user