mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.10`: - [[Search] Disable crawler on overview without ent-search (#164227)](https://github.com/elastic/kibana/pull/164227) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sander Philipse","email":"94373878+sphilipse@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-21T08:37:59Z","message":"[Search] Disable crawler on overview without ent-search (#164227)\n\n## Summary\r\n\r\nThis disables the crawler if Enterprise Search is not available on the\r\nnew overview page.","sha":"8532b996c4924ae10723d42b37a02d7f92422cdc","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.10.0","v8.11.0"],"number":164227,"url":"https://github.com/elastic/kibana/pull/164227","mergeCommit":{"message":"[Search] Disable crawler on overview without ent-search (#164227)\n\n## Summary\r\n\r\nThis disables the crawler if Enterprise Search is not available on the\r\nnew overview page.","sha":"8532b996c4924ae10723d42b37a02d7f92422cdc"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164227","number":164227,"mergeCommit":{"message":"[Search] Disable crawler on overview without ent-search (#164227)\n\n## Summary\r\n\r\nThis disables the crawler if Enterprise Search is not available on the\r\nnew overview page.","sha":"8532b996c4924ae10723d42b37a02d7f92422cdc"}},{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sander Philipse <94373878+sphilipse@users.noreply.github.com>
This commit is contained in:
parent
03e18219ad
commit
955ce39a3c
1 changed files with 67 additions and 53 deletions
|
@ -9,6 +9,8 @@ import React from 'react';
|
|||
|
||||
import { generatePath } from 'react-router-dom';
|
||||
|
||||
import { useValues } from 'kea';
|
||||
|
||||
import { EuiButton, EuiCard, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui';
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
@ -27,13 +29,18 @@ import {
|
|||
NEW_INDEX_METHOD_PATH,
|
||||
NEW_INDEX_SELECT_CONNECTOR_PATH,
|
||||
} from '../../../enterprise_search_content/routes';
|
||||
import { EuiLinkTo } from '../../../shared/react_router_helpers';
|
||||
import { HttpLogic } from '../../../shared/http/http_logic';
|
||||
import { KibanaLogic } from '../../../shared/kibana';
|
||||
import { EuiButtonTo, EuiLinkTo } from '../../../shared/react_router_helpers';
|
||||
|
||||
const START_LABEL = i18n.translate('xpack.enterpriseSearch.ingestSelector.startButton', {
|
||||
defaultMessage: 'Start',
|
||||
});
|
||||
|
||||
export const IngestionSelector: React.FC = () => {
|
||||
const { config, productFeatures } = useValues(KibanaLogic);
|
||||
const { errorConnectingMessage } = useValues(HttpLogic);
|
||||
const crawlerDisabled = Boolean(errorConnectingMessage || !config.host);
|
||||
return (
|
||||
<EuiFlexGroup>
|
||||
<EuiFlexItem>
|
||||
|
@ -61,60 +68,67 @@ export const IngestionSelector: React.FC = () => {
|
|||
}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiCard
|
||||
hasBorder
|
||||
icon={<EuiIcon type={connectorLogo} size="xxl" />}
|
||||
textAlign="left"
|
||||
title={i18n.translate('xpack.enterpriseSearch.ingestSelector.method.connectors', {
|
||||
defaultMessage: 'Connectors',
|
||||
})}
|
||||
description={i18n.translate(
|
||||
'xpack.enterpriseSearch.ingestSelector.method.connectors.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Extract, transform, index and sync data from a third-party data source.',
|
||||
{productFeatures.hasConnectors && (
|
||||
<EuiFlexItem>
|
||||
<EuiCard
|
||||
hasBorder
|
||||
icon={<EuiIcon type={connectorLogo} size="xxl" />}
|
||||
textAlign="left"
|
||||
title={i18n.translate('xpack.enterpriseSearch.ingestSelector.method.connectors', {
|
||||
defaultMessage: 'Connectors',
|
||||
})}
|
||||
description={i18n.translate(
|
||||
'xpack.enterpriseSearch.ingestSelector.method.connectors.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Extract, transform, index and sync data from a third-party data source.',
|
||||
}
|
||||
)}
|
||||
footer={
|
||||
<EuiLinkTo
|
||||
to={generatePath(
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + NEW_INDEX_SELECT_CONNECTOR_PATH
|
||||
)}
|
||||
shouldNotCreateHref
|
||||
>
|
||||
<EuiButton fullWidth>{START_LABEL}</EuiButton>
|
||||
</EuiLinkTo>
|
||||
}
|
||||
)}
|
||||
footer={
|
||||
<EuiLinkTo
|
||||
to={generatePath(
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + NEW_INDEX_SELECT_CONNECTOR_PATH
|
||||
)}
|
||||
shouldNotCreateHref
|
||||
>
|
||||
<EuiButton fullWidth>{START_LABEL}</EuiButton>
|
||||
</EuiLinkTo>
|
||||
}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiCard
|
||||
hasBorder
|
||||
icon={<EuiIcon type={crawlerLogo} size="xxl" />}
|
||||
textAlign="left"
|
||||
title={i18n.translate('xpack.enterpriseSearch.ingestSelector.method.crawler', {
|
||||
defaultMessage: 'Web Crawler',
|
||||
})}
|
||||
description={i18n.translate(
|
||||
'xpack.enterpriseSearch.ingestSelector.method.crawler.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Discover, extract, and index searchable content from websites and knowledge bases.',
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
)}
|
||||
{productFeatures.hasWebCrawler && (
|
||||
<EuiFlexItem>
|
||||
<EuiCard
|
||||
hasBorder
|
||||
isDisabled={crawlerDisabled}
|
||||
icon={<EuiIcon type={crawlerLogo} size="xxl" />}
|
||||
textAlign="left"
|
||||
title={i18n.translate('xpack.enterpriseSearch.ingestSelector.method.crawler', {
|
||||
defaultMessage: 'Web Crawler',
|
||||
})}
|
||||
description={i18n.translate(
|
||||
'xpack.enterpriseSearch.ingestSelector.method.crawler.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Discover, extract, and index searchable content from websites and knowledge bases.',
|
||||
}
|
||||
)}
|
||||
footer={
|
||||
<EuiButtonTo
|
||||
fullWidth
|
||||
isDisabled={crawlerDisabled}
|
||||
to={generatePath(ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + NEW_INDEX_METHOD_PATH, {
|
||||
type: INGESTION_METHOD_IDS.CRAWLER,
|
||||
})}
|
||||
shouldNotCreateHref
|
||||
>
|
||||
{START_LABEL}
|
||||
</EuiButtonTo>
|
||||
}
|
||||
)}
|
||||
footer={
|
||||
<EuiLinkTo
|
||||
to={generatePath(ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + NEW_INDEX_METHOD_PATH, {
|
||||
type: INGESTION_METHOD_IDS.CRAWLER,
|
||||
})}
|
||||
shouldNotCreateHref
|
||||
>
|
||||
<EuiButton fullWidth>{START_LABEL}</EuiButton>
|
||||
</EuiLinkTo>
|
||||
}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
)}
|
||||
</EuiFlexGroup>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue