Skip to content

Commit

Permalink
DRILL-6243: Added alert box to confirm shutdown of drillbit after cli…
Browse files Browse the repository at this point in the history
…cking shutdown button
  • Loading branch information
dvjyothsna committed Mar 15, 2018
1 parent dd4a46a commit 37d4fe5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions exec/java-exec/src/main/resources/rest/index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,19 @@
}
<#if model.shouldShowAdminInfo() || !model.isAuthEnabled()>
function shutdown(button) {
var requestPath = "/gracefulShutdown";
var url = getRequestUrl(requestPath);
var result = $.ajax({
type: 'POST',
url: url,
contentType : 'text/plain',
complete: function(data) {
alert(data.responseJSON["response"]);
button.prop('disabled',true).css('opacity',0.5);
}
});
if (confirm("Click ok to shutdown")) {
var requestPath = "/gracefulShutdown";
var url = getRequestUrl(requestPath);
var result = $.ajax({
type: 'POST',
url: url,
contentType : 'text/plain',
complete: function(data) {
alert(data.responseJSON["response"]);
button.prop('disabled',true).css('opacity',0.5);
}
});
}
}
</#if>
function getRequestUrl(requestPath) {
Expand Down

0 comments on commit 37d4fe5

Please sign in to comment.