-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enterprise Search] Add crawler stats to total stats on Index Overview (
#136453) * Add domain count for crawler to total stats on Index Overview * Fixing styles * Fix i18n labels
- Loading branch information
Byron Hulcher
authored
Jul 15, 2022
1 parent
28ff45a
commit e65ae3b
Showing
4 changed files
with
126 additions
and
40 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...ic/applications/enterprise_search_content/components/search_index/crawler_total_stats.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { useValues } from 'kea'; | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { CrawlerLogic } from './crawler/crawler_logic'; | ||
import { TotalStats } from './total_stats'; | ||
|
||
export const CrawlerTotalStats: React.FC = () => { | ||
const { domains, dataLoading } = useValues(CrawlerLogic); | ||
|
||
const additionalItems = [ | ||
{ | ||
description: i18n.translate( | ||
'xpack.enterpriseSearch.content.searchIndex.totalStats.domainCountCardLabel', | ||
{ | ||
defaultMessage: 'Domain count', | ||
} | ||
), | ||
isLoading: dataLoading, | ||
title: domains.length, | ||
}, | ||
]; | ||
|
||
return ( | ||
<TotalStats | ||
ingestionType={i18n.translate( | ||
'xpack.enterpriseSearch.content.searchIndex.totalStats.crawlerIngestionMethodLabel', | ||
{ | ||
defaultMessage: 'Crawler', | ||
} | ||
)} | ||
additionalItems={additionalItems} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters