Skip to content

Commit

Permalink
Remove CrawlerLanding page (#109712) (#109758)
Browse files Browse the repository at this point in the history
* Remove CrawlerLanding page

The CrawlerLanding page was being shown in non-development versions.
Now that we are at 7.15, CrawlerOverview should be shown all of the
time instead.

* Remove translations from ja-JP and zh-CN

Co-authored-by: Byron Hulcher <[email protected]>

Co-authored-by: Jason Stoltzfus <[email protected]>
Co-authored-by: Byron Hulcher <[email protected]>
  • Loading branch information
3 people authored Aug 24, 2021
1 parent 6584864 commit a30bd65
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 165 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,23 @@
*/

import React from 'react';
import { Switch } from 'react-router-dom';

import { shallow, ShallowWrapper } from 'enzyme';

import { rerender } from '../../../test_helpers';

import { CrawlerLanding } from './crawler_landing';
import { CrawlerOverview } from './crawler_overview';
import { CrawlerRouter } from './crawler_router';
import { CrawlerSingleDomain } from './crawler_single_domain';

describe('CrawlerRouter', () => {
let wrapper: ShallowWrapper;
const OLD_ENV = process.env;

beforeEach(() => {
jest.clearAllMocks();
wrapper = shallow(<CrawlerRouter />);
});

afterEach(() => {
process.env = OLD_ENV;
});

it('renders a landing page by default', () => {
expect(wrapper.find(Switch)).toHaveLength(1);
expect(wrapper.find(CrawlerLanding)).toHaveLength(1);
});

it('renders a crawler overview in dev', () => {
process.env.NODE_ENV = 'development';
rerender(wrapper);

expect(wrapper.find(CrawlerOverview)).toHaveLength(1);
});

it('renders a crawler single domain view', () => {
expect(wrapper.find(CrawlerOverview)).toHaveLength(1);
expect(wrapper.find(CrawlerSingleDomain)).toHaveLength(1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import { Route, Switch } from 'react-router-dom';

import { ENGINE_CRAWLER_DOMAIN_PATH, ENGINE_CRAWLER_PATH } from '../../routes';

import { CrawlerLanding } from './crawler_landing';
import { CrawlerOverview } from './crawler_overview';
import { CrawlerSingleDomain } from './crawler_single_domain';

export const CrawlerRouter: React.FC = () => {
return (
<Switch>
<Route exact path={ENGINE_CRAWLER_PATH}>
{process.env.NODE_ENV === 'development' ? <CrawlerOverview /> : <CrawlerLanding />}
<CrawlerOverview />
</Route>
<Route exact path={ENGINE_CRAWLER_DOMAIN_PATH}>
<CrawlerSingleDomain />
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -8374,10 +8374,6 @@
"xpack.enterpriseSearch.appSearch.engine.apiLogs.timeTableHeading": "時間",
"xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API ログ",
"xpack.enterpriseSearch.appSearch.engine.apiLogs.userAgentTitle": "ユーザーエージェント",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.description": "Webサイトのコンテンツに簡単にインデックスします。開始するには、ドメイン名を入力し、任意のエントリポイントとクロールルールを指定します。その他の手順は自動的に行われます。",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.documentationLinkLabel": "Webクローラーの詳細を参照してください。",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.standaloneLinkLabel": "Webクローラーを構成",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.title": "Webクローラーを設定",
"xpack.enterpriseSearch.appSearch.engine.crawler.title": "Webクローラー",
"xpack.enterpriseSearch.appSearch.engine.curations.activeQueryLabel": "アクティブなクエリ",
"xpack.enterpriseSearch.appSearch.engine.curations.addQueryButtonLabel": "クエリを追加",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8474,10 +8474,6 @@
"xpack.enterpriseSearch.appSearch.engine.apiLogs.timeTableHeading": "时间",
"xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API 日志",
"xpack.enterpriseSearch.appSearch.engine.apiLogs.userAgentTitle": "用户代理",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.description": "轻松索引您的网站内容。要开始,请输入您的域名,提供可选入口点和爬网规则,然后我们将处理剩下的事情。",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.documentationLinkLabel": "详细了解网络爬虫。",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.standaloneLinkLabel": "配置网络爬虫",
"xpack.enterpriseSearch.appSearch.engine.crawler.landingPage.title": "设置网络爬虫",
"xpack.enterpriseSearch.appSearch.engine.crawler.title": "网络爬虫",
"xpack.enterpriseSearch.appSearch.engine.curations.activeQueryLabel": "活动查询",
"xpack.enterpriseSearch.appSearch.engine.curations.addQueryButtonLabel": "添加查询",
Expand Down

0 comments on commit a30bd65

Please sign in to comment.