From 7439f73c234aa8a3b9047fb63b4051606bbaf7e5 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Tue, 7 Jan 2020 18:14:04 -0800 Subject: [PATCH] web console services tab treat indexer as a real service (#9139) --- .../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 3425a3ecb2b..b6ac11d1a5b 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; // 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 { - 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;