[ https://issues.apache.org/jira/browse/DRILL-6443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490017#comment-16490017 ]
ASF GitHub Bot commented on DRILL-6443: --------------------------------------- Ben-Zvi closed pull request #1287: DRILL-6443: Enable Search for both running AND completed queries URL: https://github.com/apache/drill/pull/1287 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/exec/java-exec/src/main/resources/rest/profile/list.ftl b/exec/java-exec/src/main/resources/rest/profile/list.ftl index 6a8b51dc72..f9334b891f 100644 --- a/exec/java-exec/src/main/resources/rest/profile/list.ftl +++ b/exec/java-exec/src/main/resources/rest/profile/list.ftl @@ -23,26 +23,28 @@ <script src="/static/js/jquery.dataTables-1.10.16.min.js"></script> <script> $(document).ready(function() { - $("#profileList").DataTable( { - //Preserve order - "ordering": false, - "searching": true, - "paging": true, - "pagingType": "first_last_numbers", - "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], - "lengthChange": true, - "info": true, - //Ref: https://legacy.datatables.net/ref#sDom - "sDom": '<"top"lftip><"bottom"><"clear">', - //Customized info labels - "language": { - "lengthMenu": "Display _MENU_ profiles per page", - "zeroRecords": "No matching profiles found!", - "info": "Showing page _PAGE_ of _PAGES_ ", - "infoEmpty": "No profiles available", - "infoFiltered": "(filtered _TOTAL_ from _MAX_)", - "search": "Search Profiles " - } + $.each(["running","completed"], function(i, key) { + $("#profileList_"+key).DataTable( { + //Preserve order + "ordering": false, + "searching": true, + "paging": true, + "pagingType": "full_numbers", + "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], + "lengthChange": true, + "info": true, + //Ref: https://legacy.datatables.net/ref#sDom + "sDom": '<"top"lftip><"bottom"><"clear">', + //Customized info labels + "language": { + "lengthMenu": "Display _MENU_ profiles per page", + "zeroRecords": "No matching profiles found!", + "info": "Showing page _PAGE_ of _PAGES_ ", + "infoEmpty": "No profiles available", + "infoFiltered": "(filtered _TOTAL_ from _MAX_)", + "search": "Search Profiles " + } + } ); } ); } ); </script> @@ -94,7 +96,7 @@ </#if> <#if (model.getRunningQueries()?size > 0) > <h3>Running Queries</h3> - <@list_queries queries=model.getRunningQueries()/> + <@list_queries queries=model.getRunningQueries() stateList="running" /> <div class="page-header"> </div> <#else> @@ -139,12 +141,12 @@ $("#fetchMax").val(maxFetched); }); </script> - <@list_queries queries=model.getFinishedQueries()/> + <@list_queries queries=model.getFinishedQueries() stateList="completed" /> </#macro> -<#macro list_queries queries> +<#macro list_queries queries stateList> <div class="table-responsive"> - <table id="profileList" class="table table-hover dataTable" role="grid"> + <table id="profileList_${stateList}" class="table table-hover dataTable" role="grid"> <thead> <tr role="row"> <th>Time</th> ---------------------------------------------------------------- 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: us...@infra.apache.org > Search feature for profiles is available only for running OR completed > queries, but not both > -------------------------------------------------------------------------------------------- > > Key: DRILL-6443 > URL: https://issues.apache.org/jira/browse/DRILL-6443 > Project: Apache Drill > Issue Type: Bug > Components: Web Server > Affects Versions: 1.13.0 > Reporter: Kunal Khatua > Assignee: Kunal Khatua > Priority: Major > Labels: ready-to-commit > Fix For: 1.14.0 > > Original Estimate: 48h > Remaining Estimate: 48h > > When running a query in Drill, the {{/profiles}} page will show the search > (and pagination) capabilities only for the top most visible table (i.e. > _Running Queries_ ). > The _Completed Queries_ table will show the search feature only when there > are no running queries. This is because the backend uses a generalized > freemarker macro to define the seach capabilities for the tables being > rendered. With running queries, both, _running_ and _completed queries_ > tables have the same element ID, resulting in the search capability only > being applied to the first table. -- This message was sent by Atlassian JIRA (v7.6.3#76005)