mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[App Search] Remove elasticsearch index card (#128176)
This commit is contained in:
parent
e930e907b3
commit
bdb20ede44
2 changed files with 2 additions and 45 deletions
|
@ -34,7 +34,7 @@ describe('DocumentCreationButtons', () => {
|
|||
it('renders', () => {
|
||||
const wrapper = shallow(<DocumentCreationButtons />);
|
||||
|
||||
expect(wrapper.find(EuiCard)).toHaveLength(3);
|
||||
expect(wrapper.find(EuiCard)).toHaveLength(2);
|
||||
expect(wrapper.find(EuiCardTo)).toHaveLength(1);
|
||||
});
|
||||
|
||||
|
@ -59,9 +59,6 @@ describe('DocumentCreationButtons', () => {
|
|||
|
||||
wrapper.find(EuiCard).at(1).simulate('click');
|
||||
expect(actions.openDocumentCreation).toHaveBeenCalledWith('api');
|
||||
|
||||
wrapper.find(EuiCard).at(2).simulate('click');
|
||||
expect(actions.openDocumentCreation).toHaveBeenCalledWith('elasticsearchIndex');
|
||||
});
|
||||
|
||||
it('renders the crawler button with a link to the crawler page', () => {
|
||||
|
@ -85,12 +82,4 @@ describe('DocumentCreationButtons', () => {
|
|||
shallow(<DocumentCreationButtons />);
|
||||
expect(actions.openDocumentCreation).toHaveBeenCalledWith('api');
|
||||
});
|
||||
|
||||
it('calls openDocumentCreation("elasticsearchIndex") if ?method=elasticsearchIndex', () => {
|
||||
const search = '?method=elasticsearchIndex';
|
||||
(useLocation as jest.Mock).mockImplementationOnce(() => ({ search }));
|
||||
|
||||
shallow(<DocumentCreationButtons />);
|
||||
expect(actions.openDocumentCreation).toHaveBeenCalledWith('elasticsearchIndex');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,9 +57,6 @@ export const DocumentCreationButtons: React.FC<Props> = ({
|
|||
case 'api':
|
||||
openDocumentCreation('api');
|
||||
break;
|
||||
case 'elasticsearchIndex':
|
||||
openDocumentCreation('elasticsearchIndex');
|
||||
break;
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
@ -69,7 +66,7 @@ export const DocumentCreationButtons: React.FC<Props> = ({
|
|||
<p>
|
||||
{i18n.translate('xpack.enterpriseSearch.appSearch.documentCreation.helperText', {
|
||||
defaultMessage:
|
||||
'There are four ways to send documents to your engine for indexing. You can paste or upload a JSON file, POST to the documents API endpoint, connect to an existing Elasticsearch index (beta), or use the Elastic Web Crawler to automatically index documents from a URL.',
|
||||
'There are three ways to send documents to your engine for indexing. You can paste or upload a JSON file, POST to the documents API endpoint, or use the Elastic Web Crawler to automatically index documents from a URL.',
|
||||
})}
|
||||
</p>
|
||||
);
|
||||
|
@ -183,35 +180,6 @@ export const DocumentCreationButtons: React.FC<Props> = ({
|
|||
onClick={() => openDocumentCreation('api')}
|
||||
isDisabled={disabled}
|
||||
/>
|
||||
<EuiSpacer size="m" />
|
||||
<EuiCard
|
||||
hasBorder
|
||||
layout="horizontal"
|
||||
betaBadgeProps={{
|
||||
label: i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.documentCreation.buttons.elasticsearchBetaBadge',
|
||||
{ defaultMessage: 'Beta' }
|
||||
),
|
||||
tooltipContent: i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.documentCreation.buttons.elasticsearchTooltip',
|
||||
{
|
||||
defaultMessage:
|
||||
'This feature is not GA. Please help us by reporting any bugs you encounter.',
|
||||
}
|
||||
),
|
||||
}}
|
||||
title={i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.documentCreation.buttons.elasticsearchTitle',
|
||||
{ defaultMessage: 'Use an Elasticsearch Index' }
|
||||
)}
|
||||
description={i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.documentCreation.buttons.elasticsearchDescription',
|
||||
{ defaultMessage: 'Search your existing indices with App Search' }
|
||||
)}
|
||||
icon={<EuiIcon type="indexOpen" size="xl" color="primary" />}
|
||||
onClick={() => openDocumentCreation('elasticsearchIndex')}
|
||||
isDisabled={disabled}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
{!isFlyout && emptyState}
|
||||
</EuiFlexGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue