Github user sohami commented on a diff in the pull request:
https://github.com/apache/drill/pull/1153#discussion_r173030603
--- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
@@ -272,6 +281,12 @@
<#if model.shouldShowAdminInfo()>
function shutdown(address,button) {
url = "http://"+address+":"+portNum+"/gracefulShutdown";
+ var ssl = $('#ssl').val();
+ url = "http://";
+ if (ssl == "ssl_enabled") {
+ url = "https://";
+ }
+ url = url+host+"/gracefulShutdown";
--- End diff --
I guess you can simplify the `shutdown` function as below.
```
function shutdown(button) {
var protocol = location.protocol;
var host = location.host;
var requestPath = "/gracefulShutdown";
var url = protocol+host+requestPath;
......
....
}
```
---