luocooong commented on a change in pull request #2154:
URL: https://github.com/apache/drill/pull/2154#discussion_r563265351
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
##########
@@ -169,6 +170,17 @@ public JsonResult enablePlugin(@PathParam("name") String
name, @PathParam("val")
}
}
+ /**
+ * @deprecated use the method with POST request {@link #enablePlugin} instead
Review comment:
I recommend remove all the methods of marked `@Deprecated` in this
class. Help with code cleanup.
##########
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:
Is it possible to extend the width of the `modal`? The title in the
screenshot used two lines...
----------------------------------------------------------------
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]