mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
# Backport This will backport the following commits from `main` to `8.7`: - [[Enterprise Search] Add docslinks for extraction rules (#150739)](https://github.com/elastic/kibana/pull/150739) <!--- 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-02-10T15:55:37Z","message":"[Enterprise Search] Add docslinks for extraction rules (#150739)\n\n## Summary\r\n\r\nAdds doclinks for crawler extraction rules","sha":"4d0de8beb757ca13edc7d54029304f49dc88fd20","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.7.0","v8.8.0"],"number":150739,"url":"https://github.com/elastic/kibana/pull/150739","mergeCommit":{"message":"[Enterprise Search] Add docslinks for extraction rules (#150739)\n\n## Summary\r\n\r\nAdds doclinks for crawler extraction rules","sha":"4d0de8beb757ca13edc7d54029304f49dc88fd20"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150739","number":150739,"mergeCommit":{"message":"[Enterprise Search] Add docslinks for extraction rules (#150739)\n\n## Summary\r\n\r\nAdds doclinks for crawler extraction rules","sha":"4d0de8beb757ca13edc7d54029304f49dc88fd20"}}]}] BACKPORT--> Co-authored-by: Sander Philipse <94373878+sphilipse@users.noreply.github.com>
This commit is contained in:
parent
90e4cc2042
commit
849e8107cc
7 changed files with 56 additions and 3 deletions
|
@ -131,6 +131,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
|
|||
connectorsMongoDB: `${ENTERPRISE_SEARCH_DOCS}connectors-mongodb.html`,
|
||||
connectorsMySQL: `${ENTERPRISE_SEARCH_DOCS}connectors-mysql.html`,
|
||||
connectorsWorkplaceSearch: `${ENTERPRISE_SEARCH_DOCS}connectors.html#connectors-workplace-search`,
|
||||
crawlerExtractionRules: `${ENTERPRISE_SEARCH_DOCS}crawler-extraction-rules.html`,
|
||||
crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`,
|
||||
crawlerOverview: `${ENTERPRISE_SEARCH_DOCS}crawler.html`,
|
||||
deployTrainedModels: `${MACHINE_LEARNING_DOCS}ml-nlp-deploy-models.html`,
|
||||
|
|
|
@ -116,6 +116,7 @@ export interface DocLinks {
|
|||
readonly connectorsMongoDB: string;
|
||||
readonly connectorsMySQL: string;
|
||||
readonly connectorsWorkplaceSearch: string;
|
||||
readonly crawlerExtractionRules: string;
|
||||
readonly crawlerManaging: string;
|
||||
readonly crawlerOverview: string;
|
||||
readonly deployTrainedModels: string;
|
||||
|
|
|
@ -23,6 +23,7 @@ import {
|
|||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { Status } from '../../../../../../../common/types/api';
|
||||
import { docLinks } from '../../../../../shared/doc_links';
|
||||
|
||||
import { IndexViewLogic } from '../../index_view_logic';
|
||||
|
||||
|
@ -88,7 +89,7 @@ export const CrawlerConfiguration: React.FC = () => {
|
|||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiLink
|
||||
href="TODO"
|
||||
href={`${docLinks.crawlerManaging}#crawler-managing-html-storage`}
|
||||
data-telemetry-id="entSearchContent-crawler-configuration-learnMoreExtraction"
|
||||
>
|
||||
{i18n.translate(
|
||||
|
|
|
@ -27,6 +27,7 @@ import {
|
|||
EuiSpacer,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import {
|
||||
|
@ -34,6 +35,7 @@ import {
|
|||
ExtractionRule,
|
||||
ExtractionRuleBase,
|
||||
} from '../../../../../../../../common/types/extraction_rules';
|
||||
import { docLinks } from '../../../../../../shared/doc_links';
|
||||
|
||||
import { ContentFieldsPanel } from './content_fields_panel';
|
||||
import { EditFieldRuleFlyout } from './edit_field_rule_flyout';
|
||||
|
@ -362,7 +364,7 @@ export const EditExtractionRule: React.FC<EditExtractionRuleProps> = ({
|
|||
<EuiSpacer />
|
||||
<EuiLink
|
||||
data-telemetry-id="entSearchContent-crawler-domainDetail-extractionRules-learnMoreUrlFilters"
|
||||
href="TODO"
|
||||
href={`${docLinks.crawlerExtractionRules}#crawler-extraction-rules-html-filters`}
|
||||
external
|
||||
>
|
||||
{i18n.translate(
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
EuiFlyoutHeader,
|
||||
EuiForm,
|
||||
EuiFormRow,
|
||||
EuiLink,
|
||||
EuiPanel,
|
||||
EuiRadioGroup,
|
||||
EuiSpacer,
|
||||
|
@ -35,6 +36,7 @@ import {
|
|||
FieldType,
|
||||
MultipleObjectsHandling,
|
||||
} from '../../../../../../../../common/types/extraction_rules';
|
||||
import { docLinks } from '../../../../../../shared/doc_links';
|
||||
|
||||
interface EditFieldRuleFlyoutProps {
|
||||
fieldRule: ExtractionRuleFieldRule | null;
|
||||
|
@ -274,6 +276,34 @@ export const EditFieldRuleFlyout: React.FC<EditFieldRuleFlyoutProps> = ({
|
|||
)}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
<EuiSpacer />
|
||||
{field.value === FieldType.HTML ? (
|
||||
<EuiLink
|
||||
data-telemetry-id="entSearchContent-crawler-domainDetail-extractionRules-learnMoreCSSSelectors"
|
||||
href={`${docLinks.crawlerExtractionRules}#crawler-extraction-rules-css-selectors`}
|
||||
external
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.cssSelectorsLink',
|
||||
{
|
||||
defaultMessage: 'Learn more about CSS selectors',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
) : (
|
||||
<EuiLink
|
||||
data-telemetry-id="entSearchContent-crawler-domainDetail-extractionRules-learnMoreUrlPatterns"
|
||||
href={`${docLinks.crawlerExtractionRules}#crawler-extraction-rules-url-patterns`}
|
||||
external
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.urlPatternsLinks',
|
||||
{
|
||||
defaultMessage: 'Learn more about URL patterns',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
@ -450,6 +480,19 @@ export const EditFieldRuleFlyout: React.FC<EditFieldRuleFlyoutProps> = ({
|
|||
</>
|
||||
)}
|
||||
/>
|
||||
<EuiSpacer />
|
||||
<EuiLink
|
||||
data-telemetry-id="entSearchContent-crawler-domainDetail-extractionRules-learnMoreDifferentContent"
|
||||
href={`${docLinks.crawlerExtractionRules}#crawler-extraction-rules-field-content`}
|
||||
external
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.differentContentLink',
|
||||
{
|
||||
defaultMessage: 'Learn more about storing different kinds of content',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
</EuiPanel>
|
||||
</EuiForm>
|
||||
</EuiFlyoutBody>
|
||||
|
|
|
@ -25,6 +25,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import { CANCEL_BUTTON_LABEL } from '../../../../../../shared/constants';
|
||||
import { docLinks } from '../../../../../../shared/doc_links';
|
||||
|
||||
import { EditExtractionRule } from './edit_extraction_rule';
|
||||
import { ExtractionRulesLogic } from './extraction_rules_logic';
|
||||
|
@ -116,7 +117,7 @@ export const ExtractionRules: React.FC = () => {
|
|||
defaultMessage="Create a content extraction rule to change where the documents get their data during a sync. {learnMoreLink}"
|
||||
values={{
|
||||
learnMoreLink: (
|
||||
<EuiLink href="TODO">
|
||||
<EuiLink href={`${docLinks.crawlerExtractionRules}`} external>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.crawler.extractionRules.learnMoreLink',
|
||||
{
|
||||
|
@ -129,6 +130,7 @@ export const ExtractionRules: React.FC = () => {
|
|||
/>
|
||||
</p>
|
||||
</EuiText>
|
||||
<EuiSpacer />
|
||||
{editingExtractionRule ? (
|
||||
<EditExtractionRule
|
||||
cancelEditing={cancelEditExtractionRule}
|
||||
|
|
|
@ -62,6 +62,7 @@ class DocLinks {
|
|||
public connectorsMongoDB: string;
|
||||
public connectorsMySQL: string;
|
||||
public connectorsWorkplaceSearch: string;
|
||||
public crawlerExtractionRules: string;
|
||||
public crawlerManaging: string;
|
||||
public crawlerOverview: string;
|
||||
public deployTrainedModels: string;
|
||||
|
@ -178,6 +179,7 @@ class DocLinks {
|
|||
this.connectorsMongoDB = '';
|
||||
this.connectorsMySQL = '';
|
||||
this.connectorsWorkplaceSearch = '';
|
||||
this.crawlerExtractionRules = '';
|
||||
this.crawlerManaging = '';
|
||||
this.crawlerOverview = '';
|
||||
this.deployTrainedModels = '';
|
||||
|
@ -295,6 +297,7 @@ class DocLinks {
|
|||
this.connectorsMongoDB = docLinks.links.enterpriseSearch.connectorsMongoDB;
|
||||
this.connectorsMySQL = docLinks.links.enterpriseSearch.connectorsMySQL;
|
||||
this.connectorsWorkplaceSearch = docLinks.links.enterpriseSearch.connectorsWorkplaceSearch;
|
||||
this.crawlerExtractionRules = docLinks.links.enterpriseSearch.crawlerExtractionRules;
|
||||
this.crawlerManaging = docLinks.links.enterpriseSearch.crawlerManaging;
|
||||
this.crawlerOverview = docLinks.links.enterpriseSearch.crawlerOverview;
|
||||
this.deployTrainedModels = docLinks.links.enterpriseSearch.deployTrainedModels;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue