diff --git a/share/jupyter/hub/static/js/admin.js b/share/jupyter/hub/static/js/admin.js index 448674e6..4dc6eced 100644 --- a/share/jupyter/hub/static/js/admin.js +++ b/share/jupyter/hub/static/js/admin.js @@ -172,11 +172,27 @@ require(["jquery", "bootstrap", "moment", "jhapi", "utils"], function ($, bs, mo $("#stop-all-servers-dialog").modal(); }); + $("#start-all-servers").click(function () { + $("#start-all-servers-dialog").modal(); + }); + $("#stop-all-servers-dialog").find(".stop-all-button").click(function () { // stop all clicks all the active stop buttons $('.stop-server').not('.hidden').click(); }); + function start(el) { + return function(){ + $(el).click(); + } + } + + $("#start-all-servers-dialog").find(".start-all-button").click(function () { + $('.start-server').not('.hidden').each(function(i){ + setTimeout(start(this), i * 500); + }); + }); + $("#shutdown-hub").click(function () { var dialog = $("#shutdown-hub-dialog"); dialog.find("input[type=checkbox]").prop("checked", true); diff --git a/share/jupyter/hub/templates/admin.html b/share/jupyter/hub/templates/admin.html index 0d00ad4a..6cf24e0b 100644 --- a/share/jupyter/hub/templates/admin.html +++ b/share/jupyter/hub/templates/admin.html @@ -33,7 +33,10 @@