This is an automated email from the ASF dual-hosted git repository.

luoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 522e2a6  [Minor Update] Add reset button and reduce the dialog text
522e2a6 is described below

commit 522e2a6b12a220dd1887f6c3cbc3e82035717364
Author: luocooong <[email protected]>
AuthorDate: Sun May 2 10:26:15 2021 +0800

    [Minor Update] Add reset button and reduce the dialog text
---
 exec/java-exec/src/main/resources/rest/query/query.ftl             | 4 ++++
 exec/java-exec/src/main/resources/rest/runningQuery.ftl            | 2 +-
 .../java-exec/src/main/resources/rest/static/js/querySubmission.js | 7 +++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/exec/java-exec/src/main/resources/rest/query/query.ftl 
b/exec/java-exec/src/main/resources/rest/query/query.ftl
index 7d20567..74765cb 100644
--- a/exec/java-exec/src/main/resources/rest/query/query.ftl
+++ b/exec/java-exec/src/main/resources/rest/query/query.ftl
@@ -85,6 +85,10 @@
       Submit
     </button>
     &nbsp;&nbsp;&nbsp;
+    <button class="btn btn-secondary" type="button" onclick="resetQuery()">
+      Reset
+    </button>
+    &nbsp;&nbsp;&nbsp;
     <input type="checkbox" name="forceLimit" value="limit" <#if 
model.isAutoLimitEnabled()>checked</#if>>
       Limit results to <input type="text" id="autoLimit" name="autoLimit" 
min="0" value="${model.getDefaultRowsAutoLimited()?c}" size="6" 
pattern="[0-9]*">
       rows <span class="material-icons" title="Limits the number of records 
retrieved in the query.
diff --git a/exec/java-exec/src/main/resources/rest/runningQuery.ftl 
b/exec/java-exec/src/main/resources/rest/runningQuery.ftl
index ecd34ab..11ebd02 100644
--- a/exec/java-exec/src/main/resources/rest/runningQuery.ftl
+++ b/exec/java-exec/src/main/resources/rest/runningQuery.ftl
@@ -27,7 +27,7 @@
         </div>
         <div class="modal-body" style="line-height:3">
             <table border="0px" width="100%"><tr>
-                <td align="center" style="font-size:125%">Waiting for 
results... (This may take some time) <br>Please don't close this window</td>
+                <td align="center" style="font-size:125%">Waiting for 
results...<br>Please don't close this window</td>
                 <td align="right"><img src="/static/img/loader.gif"></td>
             </tr></table>
         </div>
diff --git 
a/exec/java-exec/src/main/resources/rest/static/js/querySubmission.js 
b/exec/java-exec/src/main/resources/rest/static/js/querySubmission.js
index 99d50ab..d3b226f 100644
--- a/exec/java-exec/src/main/resources/rest/static/js/querySubmission.js
+++ b/exec/java-exec/src/main/resources/rest/static/js/querySubmission.js
@@ -86,3 +86,10 @@ function submitQuery() {
     $("#queryForm").submit();
     $(window).bind("pageshow", function(event) { closePopup();});
 }
+
+//Reset Query
+function resetQuery() {
+       var editor = ace.edit("query-editor-format");
+       editor.getSession().setValue("");
+       editor.focus();
+}

Reply via email to