Add Stop All button to admin page

for stopping all single-user servers at once
This commit is contained in:
Min RK
2016-05-03 13:25:12 +02:00
parent 14a00e67b4
commit ff997bbce5
2 changed files with 17 additions and 3 deletions

View File

@@ -178,6 +178,15 @@ require(["jquery", "bootstrap", "moment", "jhapi", "utils"], function ($, bs, mo
});
});
$("#stop-all-servers").click(function () {
$("#stop-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();
});
$("#shutdown-hub").click(function () {
var dialog = $("#shutdown-hub-dialog");
dialog.find("input[type=checkbox]").prop("checked", true);