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

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

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/963#discussion_r142018753
  
    --- Diff: exec/java-exec/src/main/resources/rest/profile/list.ftl ---
    @@ -37,7 +37,42 @@
           <strong>No running queries.</strong>
         </div>
       </#if>
    -  <h3>Completed Queries</h3>
    +  <table width="100%">
    +    <script type="text/javascript" language="javascript">
    +    //Validate that the fetch number is valid
    +    function checkMaxFetch() {
    +      var maxFetch = document.forms["profileFetch"]["max"].value;
    +      console.log("maxFetch: " + maxFetch);
    +      if (isNaN(maxFetch) || (maxFetch < 1) || (maxFetch > 100000) ) {
    +        alert("Invalid Entry: " + maxFetch + "\n" +
    +               Please enter a valid number of profiles to fetch (1 to 
100000) ");
    +        return false;
    +      }
    +      return true;
    +    }
    +    </script>
    +    <tr>
    +      <td><h3>Completed Queries</h3></td>
    +      <td align="right">
    +        <form name="profileFetch" action="/profiles" onsubmit="return 
checkMaxFetch();" method="get"><span title="Max number of profiles to 
list">Showing <b>${model.getFinishedQueries()?size}</b> profiles. Max: </span>
    +        <input id="fetchMax" type="text" size="7" name="max" value="">
    --- End diff --
    
    Here we want to show the current fetch max setting. This is either:
    
    * The default number, if the user has nor provided a value.
    * The last submitted value.
    
    Let's say the default is 100. Then we'd want to first see:
    
    Max: [  100] [Fetch]
    
    The user decides to view just 20 by changing the number and clicking Fetch. 
Now we'd want to see:
    
    Max: [   20] [Fetch]
    
    Also, "Fetch" is a bit awkward. Maybe "Refresh" would be better.


> Allow listing a user-defined number of profiles 
> ------------------------------------------------
>
>                 Key: DRILL-5259
>                 URL: https://issues.apache.org/jira/browse/DRILL-5259
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Web Server
>    Affects Versions: 1.9.0
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Trivial
>             Fix For: 1.10.0, 1.12.0
>
>
> Currently, the web UI only lists the last 100 profiles. 
> This count is currently hard coded. The proposed change would be to create an 
> option in drill-override.conf to provide a flexible default value, and also 
> an option within the UI (via optional parameter in the path). 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to