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

    https://github.com/apache/drill/pull/910#discussion_r135438164
  
    --- Diff: exec/java-exec/src/main/resources/rest/query/query.ftl ---
    @@ -47,8 +58,32 @@
           <label for="query">Query</label>
           <textarea class="form-control" id="query" rows="5" name="query" 
style="font-family: Courier;"></textarea>
         </div>
    -    <button type="submit" class="btn btn-default">Submit</button>
    +
    +    <button class="btn btn-default" type=<#if model?? && model>"button" 
onclick="doSubmit()"<#else>"submit"</#if>>
    +      Submit
    +    </button>
       </form>
    +
    +    <#if model?? && model>
    +      <script>
    +        function doSubmit() {
    +          var userName = document.getElementById("userName").value;
    +          $.ajax({
    +            type: "POST",
    +            beforeSend: function (request) {
    +              request.setRequestHeader("User-Name", userName);
    +            },
    +            url: "/query",
    +            data: $("#queryForm").serializeArray(),
    +            success: function (response) {
    --- End diff --
    
    Just eager to know what will happen in case of failure since there is no 
callback provided here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to