This is an automated email from the ASF dual-hosted git repository.

cwylie pushed a commit to branch 0.17.0
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/0.17.0 by this push:
     new 865581c  web console services tab treat indexer as a real service 
(#9139) (#9151)
865581c is described below

commit 865581ca71a3a986bffc98d0d83dce70f32b4c51
Author: Clint Wylie <[email protected]>
AuthorDate: Wed Jan 8 18:45:47 2020 -0800

    web console services tab treat indexer as a real service (#9139) (#9151)
---
 .../src/views/services-view/services-view.tsx      | 30 +++++++++++++---------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/web-console/src/views/services-view/services-view.tsx 
b/web-console/src/views/services-view/services-view.tsx
index 3425a3e..b6ac11d 100644
--- a/web-console/src/views/services-view/services-view.tsx
+++ b/web-console/src/views/services-view/services-view.tsx
@@ -133,6 +133,7 @@ interface MiddleManagerQueryResultRow {
   blacklistedUntil: string | null;
   currCapacityUsed: number;
   lastCompletedTaskTime: string;
+  category: string;
   runningTasks: string[];
   worker: {
     capacity: number;
@@ -152,11 +153,12 @@ export class ServicesView extends 
React.PureComponent<ServicesViewProps, Service
   private serviceQueryManager: QueryManager<Capabilities, ServiceResultRow[]>;
 
   // Ranking
-  //   coordinator => 7
-  //   overlord => 6
-  //   router => 5
-  //   broker => 4
-  //   historical => 3
+  //   coordinator => 8
+  //   overlord => 7
+  //   router => 6
+  //   broker => 5
+  //   historical => 4
+  //   indexer => 3
   //   middle_manager => 2
   //   peon => 1
 
@@ -164,11 +166,12 @@ export class ServicesView extends 
React.PureComponent<ServicesViewProps, Service
   "server" AS "service", "server_type" AS "service_type", "tier", "host", 
"plaintext_port", "tls_port", "curr_size", "max_size",
   (
     CASE "server_type"
-    WHEN 'coordinator' THEN 7
-    WHEN 'overlord' THEN 6
-    WHEN 'router' THEN 5
-    WHEN 'broker' THEN 4
-    WHEN 'historical' THEN 3
+    WHEN 'coordinator' THEN 8
+    WHEN 'overlord' THEN 7
+    WHEN 'router' THEN 6
+    WHEN 'broker' THEN 5
+    WHEN 'historical' THEN 4
+    WHEN 'indexer' THEN 3
     WHEN 'middle_manager' THEN 2
     WHEN 'peon' THEN 1
     ELSE 0
@@ -426,7 +429,7 @@ ORDER BY "rank" DESC, "service" DESC`;
             width: 100,
             filterable: false,
             accessor: row => {
-              if (row.service_type === 'middle_manager') {
+              if (row.service_type === 'middle_manager' || row.service_type 
=== 'indexer') {
                 return row.worker ? row.currCapacityUsed / row.worker.capacity 
: null;
               } else {
                 return row.max_size ? row.curr_size / row.max_size : null;
@@ -440,6 +443,7 @@ ORDER BY "rank" DESC, "service" DESC`;
                   const totalMax = sum(originalHistoricals, s => s.max_size);
                   return fillIndicator(totalCurr / totalMax);
 
+                case 'indexer':
                 case 'middle_manager':
                   const originalMiddleManagers = row.subRows.map(r => 
r._original);
                   const totalCurrCapacityUsed = sum(
@@ -463,6 +467,7 @@ ORDER BY "rank" DESC, "service" DESC`;
                 case 'historical':
                   return fillIndicator(row.value);
 
+                case 'indexer':
                 case 'middle_manager':
                   const currCapacityUsed = deepGet(row, 
'original.currCapacityUsed') || 0;
                   const capacity = deepGet(row, 'original.worker.capacity');
@@ -484,7 +489,7 @@ ORDER BY "rank" DESC, "service" DESC`;
             width: 400,
             filterable: false,
             accessor: row => {
-              if (row.service_type === 'middle_manager') {
+              if (row.service_type === 'middle_manager' || row.service_type 
=== 'indexer') {
                 if (deepGet(row, 'worker.version') === '') return 'Disabled';
 
                 const details: string[] = [];
@@ -517,6 +522,7 @@ ORDER BY "rank" DESC, "service" DESC`;
                     segmentsToDropSize,
                   );
 
+                case 'indexer':
                 case 'middle_manager':
                   return row.value;
 


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

Reply via email to