@@ -16,20 +16,21 @@ import {
1616 EuiContextMenuPanel ,
1717 EuiFlexGroup ,
1818 EuiFlexItem ,
19+ EuiLink ,
1920 EuiPopover ,
2021 EuiSearchBar ,
2122 EuiSpacer ,
23+ EuiText ,
2224 EuiTitle ,
2325} from '@elastic/eui' ;
2426
2527import { i18n } from '@kbn/i18n' ;
2628import { FormattedMessage } from '@kbn/i18n-react' ;
2729
28- import { HttpLogic } from '../../../shared/http ' ;
30+ import { LEARN_MORE_LINK } from '../../../shared/constants ' ;
2931import { KibanaLogic } from '../../../shared/kibana' ;
3032import { handlePageChange } from '../../../shared/table_pagination' ;
3133import {
32- NEW_CRAWLER_PATH ,
3334 NEW_INDEX_SELECT_CONNECTOR_CLIENTS_PATH ,
3435 NEW_INDEX_SELECT_CONNECTOR_NATIVE_PATH ,
3536 NEW_INDEX_SELECT_CONNECTOR_PATH ,
@@ -41,9 +42,10 @@ import { DefaultSettingsFlyout } from '../settings/default_settings_flyout';
4142import { ConnectorStats } from './connector_stats' ;
4243import { ConnectorsLogic } from './connectors_logic' ;
4344import { ConnectorsTable } from './connectors_table' ;
44- import { CrawlerEmptyState } from './crawler_empty_state' ;
4545import { CreateConnector } from './create_connector' ;
4646import { DeleteConnectorModal } from './delete_connector_modal' ;
47+ import { ElasticManagedWebCrawlerEmptyPrompt } from './elastic_managed_web_crawler_empty_prompt' ;
48+ import { SelfManagedWebCrawlerEmptyPrompt } from './self_managed_web_crawler_empty_prompt' ;
4749
4850export const connectorsBreadcrumbs = [
4951 i18n . translate ( 'xpack.enterpriseSearch.content.connectors.breadcrumb' , {
@@ -59,12 +61,12 @@ export const crawlersBreadcrumbs = [
5961
6062export interface ConnectorsProps {
6163 isCrawler : boolean ;
64+ isCrawlerSelfManaged ?: boolean ;
6265}
63- export const Connectors : React . FC < ConnectorsProps > = ( { isCrawler } ) => {
66+ export const Connectors : React . FC < ConnectorsProps > = ( { isCrawler, isCrawlerSelfManaged } ) => {
6467 const { fetchConnectors, onPaginate, setIsFirstRequest, openDeleteModal } =
6568 useActions ( ConnectorsLogic ) ;
6669 const { data, isLoading, searchParams, isEmpty, connectors } = useValues ( ConnectorsLogic ) ;
67- const { errorConnectingMessage } = useValues ( HttpLogic ) ;
6870 const [ searchQuery , setSearchValue ] = useState ( '' ) ;
6971 const [ showMoreOptionsPopover , setShowMoreOptionsPopover ] = useState < boolean > ( false ) ;
7072 const [ showDefaultSettingsFlyout , setShowDefaultSettingsFlyout ] = useState < boolean > ( false ) ;
@@ -95,6 +97,29 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
9597 : i18n . translate ( 'xpack.enterpriseSearch.crawlers.title' , {
9698 defaultMessage : 'Elastic Web Crawler' ,
9799 } ) ,
100+ description : [
101+ < EuiText >
102+ < p >
103+ < FormattedMessage
104+ id = "xpack.enterpriseSearch.webcrawlers.headerContent"
105+ defaultMessage = "Discover extract and index searchable content from websites and knowledge bases {learnMoreLink}"
106+ values = { {
107+ learnMoreLink : (
108+ < EuiLink
109+ data-test-subj = "entSearchContentConnectorsLearnMoreLink"
110+ external
111+ target = "_blank"
112+ href = { 'https://github.com/elastic/crawler' }
113+ >
114+ { LEARN_MORE_LINK }
115+ </ EuiLink >
116+ ) ,
117+ } }
118+ />
119+ </ p >
120+ </ EuiText > ,
121+ ] ,
122+
98123 rightSideGroupProps : {
99124 gutterSize : 's' ,
100125 responsive : false ,
@@ -199,52 +224,26 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
199224 ]
200225 : [ ] ) ,
201226 ]
202- : [
203- < EuiButton
204- data-test-subj = "entSearchContent-crawlers-newCrawlerButton"
205- data-telemetry-id = "entSearchContent-crawlers-newCrawlerButton"
206- disabled = { Boolean ( errorConnectingMessage ) }
207- key = "newCrawler"
208- color = "primary"
209- iconType = "plusInCircle"
210- fill
211- onClick = { ( ) => {
212- KibanaLogic . values . navigateToUrl ( NEW_CRAWLER_PATH ) ;
213- } }
214- >
215- { i18n . translate ( 'xpack.enterpriseSearch.connectors.newCrawlerButtonLabel' , {
216- defaultMessage : 'New web crawler' ,
217- } ) }
218- </ EuiButton > ,
219- ...( productFeatures . hasDefaultIngestPipeline
220- ? [
221- < EuiButton
222- color = "primary"
223- data-test-subj = "entSearchContent-connectors-defaultSettingsPopover"
224- data-telemetry-id = "entSearchContent-connectors-defaultSettingsPopover"
225- onClick = { ( ) => setShowDefaultSettingsFlyout ( true ) }
226- >
227- { i18n . translate (
228- 'xpack.enterpriseSearch.content.searchIndices.defaultSettings' ,
229- {
230- defaultMessage : 'Default settings' ,
231- }
232- ) }
233- </ EuiButton > ,
234- ]
235- : [ ] ) ,
236- ] ,
227+ : undefined ,
237228 } }
238229 >
239230 { productFeatures . hasDefaultIngestPipeline && showDefaultSettingsFlyout && (
240231 < DefaultSettingsFlyout closeFlyout = { ( ) => setShowDefaultSettingsFlyout ( false ) } />
241232 ) }
242- < ConnectorStats isCrawler = { isCrawler } />
243- < EuiSpacer />
233+ { ! isCrawler && (
234+ < >
235+ < ConnectorStats isCrawler = { isCrawler } />
236+ < EuiSpacer />
237+ </ >
238+ ) }
244239
245240 < EuiFlexGroup direction = "column" >
246241 { isEmpty && isCrawler ? (
247- < CrawlerEmptyState />
242+ isCrawlerSelfManaged ? (
243+ < SelfManagedWebCrawlerEmptyPrompt />
244+ ) : (
245+ < ElasticManagedWebCrawlerEmptyPrompt />
246+ )
248247 ) : (
249248 < >
250249 < EuiFlexItem >
0 commit comments