arina-ielchiieva commented on a change in pull request #1588: DRILL-6921: Add
Clear button for /options filter
URL: https://github.com/apache/drill/pull/1588#discussion_r244313764
##########
File path: exec/java-exec/src/main/resources/rest/options.ftl
##########
@@ -24,8 +24,24 @@
<script>
//Alter System Values
function alterSysOption(optionName, optionValue, optionKind) {
+ var currHref = location.href;
+ var redirectHref = currHref.replace(/(.?filter=).*/,"");
+ //Read filter value and apply to reload with new filter
+ var reApplyFilter = $("#searchBox").val();
+ if (reApplyFilter != null && reApplyFilter.trim().length > 0) {
+ redirectHref = redirectHref + "?filter=" + reApplyFilter.trim();
+ } else { //Apply filter for updated field
+ redirectHref = redirectHref + "?filter=" + optionName;
+ }
+ //Debug
+ console.log("Current: "+currHref);
Review comment:
This will output message into the console each time method is called. Please
remove.
----------------------------------------------------------------
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