You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/12/07 09:32:45 UTC

[GitHub] arina-ielchiieva commented on a change in pull request #1563: DRILL-6883: Force reload of options after resetting parameter

arina-ielchiieva commented on a change in pull request #1563: DRILL-6883: Force reload of options after resetting parameter
URL: https://github.com/apache/drill/pull/1563#discussion_r239743620
 
 

 ##########
 File path: exec/java-exec/src/main/resources/rest/options.ftl
 ##########
 @@ -22,9 +22,29 @@
     <script type="text/javascript" language="javascript"  src="/static/js/jquery.dataTables-1.10.16.min.js"> </script>
     <script type="text/javascript" language="javascript" src="/static/js/dataTables.colVis-1.1.0.min.js"></script>
     <script>
-        function resetToDefault(optionName, optionValue, optionKind) {
-            $.post("/option/"+optionName, {kind: optionKind, name: optionName, value: optionValue}, function (status) { location.reload(true); } );
+    //Alter System Values
+    function alterSysOption(optionName, optionValue, optionKind) {
+        $.post("/option/"+optionName, {kind: optionKind, name: optionName, value: optionValue}, function () {
+            location.reload(true);
+        });
+    }
+
+    //Read Values and apply
+    function alterSysOptionUsingId(optionRawName) {
+        //Escaping '.' for id search
+        let optionName = optionRawName.replace(/\./gi, "\\.");
+        let optionKind = $("#"+optionName+" input[name='kind']").attr("value");
 
 Review comment:
   Please add comments with explanation above lines 36, 37, 39.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services