[Enterprise Search] Add link for connector documentation on create index page (#137259)

This commit is contained in:
Sander Philipse 2022-07-27 12:56:35 +02:00 committed by GitHub
parent 57f7a48b8d
commit c1f21d4f4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 10 deletions

View file

@ -119,6 +119,7 @@ export const MethodConnector: React.FC = () => {
return (
<NewSearchIndexTemplate
docsUrl="https://github.com/elastic/connectors-ruby/blob/main/README.md"
error={errorToMessage(error)}
title={i18n.translate('xpack.enterpriseSearch.content.newIndex.steps.buildConnector.title', {
defaultMessage: 'Build a connector',

View file

@ -38,6 +38,7 @@ import { LanguageForOptimization } from './types';
export interface Props {
buttonLoading?: boolean;
docsUrl?: string;
error?: string | React.ReactNode;
onNameChange?(name: string): void;
onSubmit(name: string, language: LanguageForOptimization): void;
@ -47,6 +48,7 @@ export interface Props {
export const NewSearchIndexTemplate: React.FC<Props> = ({
children,
docsUrl,
error,
title,
onNameChange,
@ -208,16 +210,18 @@ export const NewSearchIndexTemplate: React.FC<Props> = ({
)}
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiLink target="_blank" href="#">
{i18n.translate(
'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.viewDocumentation.linkText',
{
defaultMessage: 'View the documentation',
}
)}
</EuiLink>
</EuiFlexItem>
{!!docsUrl && (
<EuiFlexItem grow={false}>
<EuiLink target="_blank" href={docsUrl}>
{i18n.translate(
'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.viewDocumentation.linkText',
{
defaultMessage: 'View the documentation',
}
)}
</EuiLink>
</EuiFlexItem>
)}
</EuiFlexGroup>
</EuiForm>
<EuiHorizontalRule />