sohami commented on a change in pull request #1591: DRILL-6933: Fix ctrl+enter 
when Impersonation is disabled
URL: https://github.com/apache/drill/pull/1591#discussion_r244871480
 
 

 ##########
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##########
 @@ -506,7 +504,8 @@ table.sortable thead .sorting_desc { background-image: 
url("/static/img/black-de
     document.getElementById('queryForm')
             .addEventListener('keydown', function(e) {
       if (!(e.keyCode == 13 && (e.metaKey || e.ctrlKey))) return;
-      if (e.target.form) doSubmitQueryWithUserName();
+      if (e.target.form) 
+        <#if 
model.isImpersonationOnlyEnabled()>doSubmitQueryWithUserName()<#else>submitQuery()</#if>;
 
 Review comment:
   I believe the root cause of the issue is here and below where for 
non-impersonation case submit was not actually done. In those cases username 
will be null inside `doSubmitQueryWithUserName` and will return with an alert.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to