Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useEffect, useState } from 'react';
import React, { useEffect, useMemo, useState } from 'react';

import { useActions, useValues } from 'kea';

Expand Down Expand Up @@ -46,7 +46,9 @@ import './index_mappings.scss';
export const SearchIndexIndexMappings: React.FC = () => {
const { indexName } = useValues(IndexNameLogic);
const { hasDocumentLevelSecurityFeature, isHiddenIndex } = useValues(IndexViewLogic);
const { indexMappingComponent: IndexMappingComponent, productFeatures } = useValues(KibanaLogic);
const { indexMappingComponent, productFeatures } = useValues(KibanaLogic);

const IndexMappingComponent = useMemo(() => indexMappingComponent, []);

const [selectedIndexType, setSelectedIndexType] =
useState<AccessControlSelectorOption['value']>('content-index');
Expand Down Expand Up @@ -154,7 +156,12 @@ export const SearchIndexIndexMappings: React.FC = () => {
</p>
</EuiText>
<EuiSpacer size="s" />
<EuiLink href={docLinks.connectorsMappings} target="_blank" external>
<EuiLink
data-test-subj="enterpriseSearchSearchIndexIndexMappingsLearnHowToCustomizeIndexMappingsAndSettingsLink"
href={docLinks.connectorsMappings}
target="_blank"
external
>
{i18n.translate('xpack.enterpriseSearch.content.searchIndex.mappings.docLink', {
defaultMessage: 'Learn how to customize index mappings and settings',
})}
Expand Down Expand Up @@ -187,7 +194,12 @@ export const SearchIndexIndexMappings: React.FC = () => {
</p>
</EuiText>
<EuiSpacer size="s" />
<EuiLink href={docLinks.ingestPipelines} target="_blank" external>
<EuiLink
data-test-subj="enterpriseSearchSearchIndexIndexMappingsLearnMoreLink"
href={docLinks.ingestPipelines}
target="_blank"
external
>
{i18n.translate('xpack.enterpriseSearch.content.searchIndex.transform.docLink', {
defaultMessage: 'Learn more',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React from 'react';
import { documentationService } from '../../../../services';
import { UIM_APP_NAME } from '../../../../../../common/constants/ui_metric';
import { httpService } from '../../../../services/http';
import { notificationService } from '../../../../services/notification';
Expand All @@ -28,6 +29,7 @@ export const IndexMappingWithContext: React.FC<IndexMappingWithContextProps> = (
httpService.setup(core.http);
notificationService.setup(core.notifications);
}
documentationService.setup(core.docLinks);

const newDependencies: AppDependencies = {
...dependencies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import { dynamic } from '@kbn/shared-ux-utility';
import React, { Suspense, ComponentType } from 'react';
import { IndexMappingWithContextProps } from './index_mapping_with_context_types';

// const IndexMappingWithContext = lazy<ComponentType<IndexMappingWithContextProps>>(async () => {
// return {
// default: (await import('./index_mapping_with_context')).IndexMappingWithContext,
// };
// });

const IndexMappingWithContext = dynamic<ComponentType<IndexMappingWithContextProps>>(() =>
import('./index_mapping_with_context').then((mod) => ({ default: mod.IndexMappingWithContext }))
);
Expand Down