Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/1203#discussion_r181258290 --- Diff: exec/java-exec/src/main/resources/rest/index.ftl --- @@ -283,20 +308,114 @@ alert(errorThrown); }, success: function(data) { - alert(data["response"]); + alert(data["response"]); button.prop('disabled',true).css('opacity',0.5); } }); } } - </#if> + + function remoteShutdown(button,host) { + var url = location.protocol + "//" + host + "/gracefulShutdown"; + 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 popOutRemoteDbitUI(dbitHost, dbitPort) { --- End diff -- this and functions below should be under `<#if !model.isAuthEnabled()> <#/if>` block
---