From 8ec5296b77a11900203d43ea29a7060183ac4259 Mon Sep 17 00:00:00 2001 From: Byron Hulcher Date: Wed, 2 Jun 2021 11:36:40 -0400 Subject: [PATCH] [App Search] Crawler Landing Page (#100822) * New CrawlerLanding component * New CrawlerRouter component * Adding CrawlerRouter to EngineRouter * Using internal route for Crawler link in EngineNav * Rename crawler landing background * Fix CrawlerLanding css * Fix crawler documentation link * Add Crawler title to breadcrumbs * Reduce png filesize * Improve CrawlerLanding copy * Update x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.scss Co-authored-by: Constance Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Constance --- .../crawler/assets/bg_crawler_landing.png | Bin 0 -> 14495 bytes .../components/crawler/constants.ts | 2 +- .../components/crawler/crawler_landing.scss | 13 +++ .../crawler/crawler_landing.test.tsx | 43 +++++++++ .../components/crawler/crawler_landing.tsx | 85 ++++++++++++++++++ .../crawler/crawler_router.test.tsx | 34 +++++++ .../components/crawler/crawler_router.tsx | 27 ++++++ .../app_search/components/crawler/index.ts | 1 + .../components/engine/engine_nav.tsx | 4 +- .../components/engine/engine_router.test.tsx | 8 ++ .../components/engine/engine_router.tsx | 10 ++- 11 files changed, 221 insertions(+), 6 deletions(-) create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/assets/bg_crawler_landing.png create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.scss create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.test.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.test.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.tsx diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/assets/bg_crawler_landing.png b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/assets/bg_crawler_landing.png new file mode 100644 index 0000000000000000000000000000000000000000..e1f14ac26f353bd601d36f9e436c2faf164c24ff GIT binary patch literal 14495 zcmZX*by!s07dAXdN=Qkkgbdv!Azey$BQPQ%ozl`FIe>HvNDnRDFqE`(4h;hXf*{Cu zp5OPrf4y^^>&#wj-RoZWUVHYLxX#3AX($umQsaU^AOckt1sxCw6AA)7d5eP%cubUM zrvRf>>#d$5VD9gq?fiEjcMg#o8_3-w&vp(@fwNJ2?atvj;@|=Z?H&Aw1OWf>Ad&m2-9YZnF>-tV)S#no_W)_oUVD(% z2aFF>d-d9Dfx%_BJV1f~FbL%KAyDpQXYW+2trkc`b;}{UWe!vOc8||@_mHS=S>5jc zQg#l2u^fJ#}@#2Ke1atKwu}aTe<9Vzjyhd1P(a={{yH9RR6Rw z<+nZs4EDc%AE&x9ufRB$4ND-BNE%))mLDdvc9bgj_6jb`( zdB1W}uc7P^+Na-M3*-V(0IX7m0-6Jm14uwTs#D&us~!mL?i>UCkwJN3I%LU9c29gQhxU-Al43!puGqEvq1NN72nV3-d#IX`RuQmp9ZuAsCCgLd)2LQ z*(<+|I5`H8O|w7;_A4f2tj+hkTY!cDecnAdJOBC_00RPm(g*%Vz?1=Phr#AYpRG^7 zxFex~XGy;M3-eM2x@s|>#Z?p$yZeZZ&C{CvUS$@dr}@2J$1L#L?ex^q&;>Du z$ZQaGTZQCXAzkwMWbzr2NmDW#`HYse-Rnd$-I@jex1JaV7eP+?Wbsyhk1fpKMGO1T!)+ z5+RYujlmErD@z%fzsTKDgm`90$&BJ6t63}Dv@(~aH_m9urE>}z% za6uTlA1{JPupLZ&E{XY+R?Px6258&w*LIZe0V$L%G60nF zr};HMIu?X`!50UF(dfd2PFep`soh_`qx z*Zv%rIYJ;rNXaxHI?RE_Wqaqp2muiBZ|rz=iBB9N^wKnU*H<^Oz>FP=w!5`#0evRx z2U8*jMUVd88?mJ+ZvELOLK`Bve9iPrnihc>@|Hf~G{U?5ITZCo=4GC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%kwvZ@G|WN)R7)+MBp7E-X+yD_6K1 z73iLrJPUY|v=-h0O4+_I0dA2c0a2&LD98N;pqHdYq<7K#=xLpC$Ya>)urMWGaW%E44%Gw=L$(DI-H3ypxEq-**JyumRXxrr$r6(*| zJ4Kb8y*Ij6vBJ*3PD<%iis(lrTDoZE!+SDO*sR3ai-I`TMNMSi!fM&`PT>_?r%m zSbOB6%j5SZzm4gNxugWr$w4)5B~5Jw%=UI?yi8rbOKT2m8^00FaJMAv@xuLBsCch- zS@WIX3tZRU<2JVom#}9-EYgo}!cWhlU}EL_hDdp!Bj(aR+jF$d<38i$(ZyD-{Fe@> zjqQ#qEXkTM!qg%7XGZi^?s^kSHp@MMR3!uTzRitgLM17 zNlj)`4zfJK*TY*1#x$5s4D(6)TBOr{ee8H3Q62-;ywS{@$@tM(p;vX-r4BG;N`I7n z7Ikq`s)?4VzIal$toDX3me0r=+cNiBhd-qV`Pab)hs# zM9rIUGwaxwB&F5`LR)^3zL$up8w7TZqVC=q%di5~<|~3YvD23mH^Y*aAhY@vt%3dg ztd&KmPaXv^sGpBA-_5BjhFY^)J5Lc5&?FwGY!8!eA`*uCnL@{KLZn0sDdUw7``7M- zu!6e}&^NX6xZwEv5#DrzXy J$XR{<{{WQ~4N?FA literal 0 HcmV?d00001 diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts index 0c1bf051747b5..7e95bf8fb8e45 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts @@ -9,5 +9,5 @@ import { i18n } from '@kbn/i18n'; export const CRAWLER_TITLE = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.crawler.title', - { defaultMessage: 'Crawler' } + { defaultMessage: 'Web Crawler' } ); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.scss new file mode 100644 index 0000000000000..3ace4064008b6 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.scss @@ -0,0 +1,13 @@ +.crawlerLanding { + &__panel { + overflow: hidden; + background-image: url('./assets/bg_crawler_landing.png'); + background-size: 45%; + background-repeat: no-repeat; + background-position: right -2rem; + } + + &__wrapper { + max-width: 50rem; + } +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.test.tsx new file mode 100644 index 0000000000000..9591b82773b9f --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.test.tsx @@ -0,0 +1,43 @@ +/* + * 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 { setMockValues } from '../../../__mocks__'; +import { mockEngineValues } from '../../__mocks__'; + +import React from 'react'; + +import { shallow, ShallowWrapper } from 'enzyme'; + +import { docLinks } from '../../../shared/doc_links'; + +import { CrawlerLanding } from './crawler_landing'; + +describe('CrawlerLanding', () => { + let wrapper: ShallowWrapper; + + beforeEach(() => { + setMockValues({ ...mockEngineValues }); + wrapper = shallow(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('contains an external documentation link', () => { + const externalDocumentationLink = wrapper.find('[data-test-subj="CrawlerDocumentationLink"]'); + + expect(externalDocumentationLink.prop('href')).toBe( + `${docLinks.appSearchBase}/web-crawler.html` + ); + }); + + it('contains a link to standalone App Search', () => { + const externalDocumentationLink = wrapper.find('[data-test-subj="CrawlerStandaloneLink"]'); + + expect(externalDocumentationLink.prop('href')).toBe('/as/engines/some-engine/crawler'); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.tsx new file mode 100644 index 0000000000000..a2993b4d86d5a --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_landing.tsx @@ -0,0 +1,85 @@ +/* + * 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 { + EuiButton, + EuiLink, + EuiPageHeader, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { getAppSearchUrl } from '../../../shared/enterprise_search_url'; +import { DOCS_PREFIX, ENGINE_CRAWLER_PATH } from '../../routes'; +import { generateEnginePath } from '../engine'; + +import './crawler_landing.scss'; +import { CRAWLER_TITLE } from '.'; + +export const CrawlerLanding: React.FC = () => ( +
+ + + +
+ +

+ {i18n.translate('xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.title', { + defaultMessage: 'Setup the Web Crawler', + })} +

+
+ + +

+ {i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.description', + { + defaultMessage: + "Easily index your website's content. To get started, enter your domain name, provide optional entry points and crawl rules, and we will handle the rest.", + } + )}{' '} + + {i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.documentationLinkLabel', + { + defaultMessage: 'Learn more about the web crawler.', + } + )} + +

+
+ + + {i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.standaloneLinkLabel', + { + defaultMessage: 'Configure the web crawler', + } + )} + + +
+
+
+); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.test.tsx new file mode 100644 index 0000000000000..6aa9ca8c4feb1 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.test.tsx @@ -0,0 +1,34 @@ +/* + * 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 { setMockValues } from '../../../__mocks__'; + +import { mockEngineValues } from '../../__mocks__'; + +import React from 'react'; +import { Switch } from 'react-router-dom'; + +import { shallow } from 'enzyme'; + +import { CrawlerLanding } from './crawler_landing'; +import { CrawlerRouter } from './crawler_router'; + +describe('CrawlerRouter', () => { + beforeEach(() => { + setMockValues({ ...mockEngineValues }); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('renders a landing page', () => { + const wrapper = shallow(); + + expect(wrapper.find(Switch)).toHaveLength(1); + expect(wrapper.find(CrawlerLanding)).toHaveLength(1); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.tsx new file mode 100644 index 0000000000000..fcc949de7d8b4 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_router.tsx @@ -0,0 +1,27 @@ +/* + * 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 { Route, Switch } from 'react-router-dom'; + +import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; + +import { getEngineBreadcrumbs } from '../engine'; + +import { CRAWLER_TITLE } from './constants'; +import { CrawlerLanding } from './crawler_landing'; + +export const CrawlerRouter: React.FC = () => { + return ( + + + + + + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts index edb7e43aee35e..58fb0a7cebb1a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts @@ -6,3 +6,4 @@ */ export { CRAWLER_TITLE } from './constants'; +export { CrawlerRouter } from './crawler_router'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx index 4738209cee4a2..0edf01bada938 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx @@ -12,7 +12,6 @@ import { useValues } from 'kea'; import { EuiText, EuiBadge, EuiIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { getAppSearchUrl } from '../../../shared/enterprise_search_url'; import { SideNavLink, SideNavItem } from '../../../shared/layout'; import { AppLogic } from '../../app_logic'; import { @@ -170,8 +169,7 @@ export const EngineNav: React.FC = () => { )} {canViewEngineCrawler && !isMetaEngine && ( {CRAWLER_TITLE} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx index 3d9c61599cc25..e57b25ea51a31 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx @@ -18,6 +18,7 @@ import { shallow } from 'enzyme'; import { Loading } from '../../../shared/loading'; import { AnalyticsRouter } from '../analytics'; import { ApiLogs } from '../api_logs'; +import { CrawlerRouter } from '../crawler'; import { CurationsRouter } from '../curations'; import { Documents, DocumentDetail } from '../documents'; import { EngineOverview } from '../engine_overview'; @@ -168,4 +169,11 @@ describe('EngineRouter', () => { expect(wrapper.find(SearchUI)).toHaveLength(1); }); + + it('renders a crawler view', () => { + setMockValues({ ...values, myRole: { canViewEngineCrawler: true } }); + const wrapper = shallow(); + + expect(wrapper.find(CrawlerRouter)).toHaveLength(1); + }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx index 387f8cf1b9837..40cc2ef0368c0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx @@ -23,7 +23,7 @@ import { ENGINE_DOCUMENTS_PATH, ENGINE_DOCUMENT_DETAIL_PATH, ENGINE_SCHEMA_PATH, - // ENGINE_CRAWLER_PATH, + ENGINE_CRAWLER_PATH, META_ENGINE_SOURCE_ENGINES_PATH, ENGINE_RELEVANCE_TUNING_PATH, ENGINE_SYNONYMS_PATH, @@ -34,6 +34,7 @@ import { } from '../../routes'; import { AnalyticsRouter } from '../analytics'; import { ApiLogs } from '../api_logs'; +import { CrawlerRouter } from '../crawler'; import { CurationsRouter } from '../curations'; import { DocumentDetail, Documents } from '../documents'; import { EngineOverview } from '../engine_overview'; @@ -52,7 +53,7 @@ export const EngineRouter: React.FC = () => { canViewEngineAnalytics, canViewEngineDocuments, canViewEngineSchema, - // canViewEngineCrawler, + canViewEngineCrawler, canViewMetaEngineSourceEngines, canManageEngineRelevanceTuning, canManageEngineSynonyms, @@ -143,6 +144,11 @@ export const EngineRouter: React.FC = () => { )} + {canViewEngineCrawler && ( + + + + )}