vogievetsky commented on a change in pull request #7440: Fixed grouping and 
sorting by status in task table
URL: https://github.com/apache/incubator-druid/pull/7440#discussion_r274249666
 
 

 ##########
 File path: web-console/src/views/tasks-view.tsx
 ##########
 @@ -519,6 +520,16 @@ ORDER BY "rank" DESC, "created_time" DESC`);
               const previewCount = countBy(previewValues);
               return <span>{Object.keys(previewCount).sort().map(v => `${v} 
(${previewCount[v]})`).join(', ')}</span>;
             },
+            sortMethod: (status1: string, status2: string) => {
+              const statusRanking: any = this.statusRanking;
+              if (statusRanking[status1] > statusRanking[status2]) {
 
 Review comment:
   A prettier way to describe this is `return statusRanking[status1] - 
statusRanking[status2]`

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to