[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249017671
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249015464
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249017671
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-17 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248641289
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/list.ftl
 ##
 @@ -25,12 +25,13 @@
 $(document).ready(function() {
   $.each(["running","completed"], function(i, key) {
 $("#profileList_"+key).DataTable( {
-  //Preserve order
-  "ordering": false,
+  //Permit sorting-by-column
+  "ordering": true,
+  "order": [[ 0, "desc" ]],
 
 Review comment:
   ```suggestion
 "order": [[0, "desc"]],
   ```


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


With regards,
Apache Git Services


[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-17 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248638693
 
 

 ##
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
 ##
 @@ -219,6 +219,12 @@ public int getMaxFetchedQueries() {
   return 
work.getContext().getConfig().getInt(ExecConstants.HTTP_MAX_PROFILES);
 }
 
+public String getQueriesPerPage() {
+  List queriesPerPageOptions = 
work.getContext().getConfig().getIntList(ExecConstants.HTTP_PROFILES_PER_PAGE);
+  Collections.sort(queriesPerPageOptions);
 
 Review comment:
   You are right, ArrayList is better here, but the reason is other. TreeSet is 
better for frequent sort operations on the collection. 
   So current code is fine


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


With regards,
Apache Git Services


[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-17 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248640849
 
 

 ##
 File path: exec/java-exec/src/main/resources/drill-module.conf
 ##
 @@ -142,6 +142,7 @@ drill.exec: {
   }
 }
 max_profiles: 100,
+profiles_per_page: [10,25,50,100],
 
 Review comment:
   ```suggestion
   profiles_per_page: [10, 25, 50, 100],
   ```


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


With regards,
Apache Git Services


[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-17 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248649875
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/list.ftl
 ##
 @@ -109,6 +110,21 @@
 float:left 
   }
 
+

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-16 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248211826
 
 

 ##
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
 ##
 @@ -219,6 +219,12 @@ public int getMaxFetchedQueries() {
   return 
work.getContext().getConfig().getInt(ExecConstants.HTTP_MAX_PROFILES);
 }
 
+public String getQueriesPerPage() {
+  List queriesPerPageOptions = 
work.getContext().getConfig().getIntList(ExecConstants.HTTP_PROFILES_PER_PAGE);
+  Collections.sort(queriesPerPageOptions);
 
 Review comment:
   Looks like you can use sorted collection outright, `TreeSet`.


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


With regards,
Apache Git Services


[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-16 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248213529
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/list.ftl
 ##
 @@ -109,6 +110,21 @@
 float:left 
   }
 
+