Github user sohami commented on a diff in the pull request:
https://github.com/apache/drill/pull/1169#discussion_r175598108
--- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
@@ -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);
+ }
--- End diff --
please fix indentation here and below. Also add the `error: `callback for
Ajax request.
Like alert with received error ?
---