[ 
https://issues.apache.org/jira/browse/DRILL-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392465#comment-16392465
 ] 

ASF GitHub Bot commented on DRILL-6044:
---------------------------------------

Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1153#discussion_r173371697
  
    --- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
    @@ -269,9 +277,12 @@
                                   }
                             });
           }
    -      <#if model.shouldShowAdminInfo() || !model.isAuthEnabled() >
    -          function shutdown(address,button) {
    -              url = "http://"+address+":"+portNum+"/gracefulShutdown";;
    +       <#if model.shouldShowAdminInfo() || !model.isAuthEnabled()>
    +          function shutdown(button) {
    +              var protocol = location.protocol;
    +              var host = location.host;
    +              var requestPath = "/gracefulShutdown";
    +              var url = protocol+host+requestPath;
    --- End diff --
    
    How about refactoring above lines into separate function 
`getRequestUrl(requestPath)` and call that from both the methods (`shutdown` & 
`fillQueryCount`)
    
    ```
    function getRequestUrl(requestPath) {
        var protocol = location.protocol;
        var host = location.host;
        var url = protocol + host + requestPath;
        return url;
    }
    ```


> Shutdown button does not work from WebUI
> ----------------------------------------
>
>                 Key: DRILL-6044
>                 URL: https://issues.apache.org/jira/browse/DRILL-6044
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - HTTP
>    Affects Versions: 1.13.0
>            Reporter: Krystal
>            Assignee: Venkata Jyothsna Donapati
>            Priority: Critical
>             Fix For: 1.13.0
>
>         Attachments: Screen Shot 2017-12-19 at 10.51.16 AM.png
>
>
> git.commit.id.abbrev=eb0c403
> Nothing happens when click on the SHUTDOWN button from the WebUI.  The 
> browser's debugger showed that the request failed due to access control 
> checks (see attached screen shot).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to