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

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

vvysotskyi commented on a change in pull request #2154:
URL: https://github.com/apache/drill/pull/2154#discussion_r565520223



##########
File path: exec/java-exec/src/main/resources/rest/alertModals.ftl
##########
@@ -48,26 +48,29 @@
 <script>
     //Populate the alert modal with the right message params and show
     function populateAndShowAlert(errorMsg, inputValues) {
+      let errorModal=$('#errorModal');
+      let title;
+      let body;
       if (!(errorMsg in errorMap)) {
         //Using default errorId to represent message
-        modalHeader.innerHTML=errorMsg;
-        modalBody.innerHTML="[Auto Description] "+JSON.stringify(inputValues);
+        title=errorMsg;
+        body="[Auto Description] "+JSON.stringify(inputValues);
       } else {
-        modalHeader.innerHTML=errorMap[errorMsg].msgHeader;
-        modalBody.innerHTML=errorMap[errorMsg].msgBody;
+        title=errorMap[errorMsg].msgHeader;
+        body=errorMap[errorMsg].msgBody;
       }
       //Check if substitutions are needed
-      let updatedHtml=modalBody.innerHTML;
       if (inputValues != null) {
-        var inputValuesKeys = Object.keys(inputValues);
+        let inputValuesKeys = Object.keys(inputValues);
         for (i=0; i<inputValuesKeys.length; ++i) {
-            let currKey=inputValuesKeys[i];
-            updatedHtml=updatedHtml.replace(currKey, 
escapeHtml(inputValues[currKey]));
+          let currKey=inputValuesKeys[i];
+          body=body.replace(currKey, escapeHtml(inputValues[currKey]));
         }
-        modalBody.innerHTML=updatedHtml;
       }
+      errorModal.find('.modal-title').text(title);

Review comment:
       @luocooong, can we commit it as it is, and leave this issue for a 
contributor with good frontend knowledge?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Display error message when cannot enable storage plugin
> -------------------------------------------------------
>
>                 Key: DRILL-7849
>                 URL: https://issues.apache.org/jira/browse/DRILL-7849
>             Project: Apache Drill
>          Issue Type: Sub-task
>    Affects Versions: 1.18.0
>            Reporter: Vova Vysotskyi
>            Assignee: Vova Vysotskyi
>            Priority: Major
>             Fix For: 1.19.0
>
>
> Currently, when an exception occurs during enabling the storage plugin, it is 
> not shown in the UI, like nothing was done. It may be observed when enabling 
> the RDBMS plugin with default configuration from any, storage plugins page or 
> plugin configs page.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to