Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workplace search links to doc link service #118814

Merged
merged 36 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
863e7db
Add workplace search links to doc link service
lcawl Nov 16, 2021
560f35b
Check published API changes
lcawl Nov 17, 2021
1758cd2
More workplaceSearch links
lcawl Nov 18, 2021
7167d67
Add more appSearch doc links
lcawl Nov 18, 2021
5e877cc
Add more enterpriseSearch doc links
lcawl Nov 18, 2021
af558f1
Checks published API changes
lcawl Nov 18, 2021
b82d64b
Fix jest tests
lcawl Nov 18, 2021
78b1167
Fix type checks
lcawl Nov 18, 2021
77d4736
Checks published API changes
lcawl Nov 19, 2021
01c2857
Merge branch 'main' into search-url
kibanamachine Nov 19, 2021
64d1fa5
Fixes typo
lcawl Nov 19, 2021
042d12e
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
9168d92
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
72e0dd4
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
ba7313c
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
4371ace
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
b799c08
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
57c1e22
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
2d75ac0
Update x-pack/plugins/enterprise_search/public/applications/shared/li…
lcawl Nov 19, 2021
a36630f
Update x-pack/plugins/enterprise_search/public/applications/shared/li…
lcawl Nov 19, 2021
cc692eb
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
b570c54
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
d8b9453
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
d587ffa
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
2611efb
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
766e8d1
Update x-pack/plugins/enterprise_search/public/applications/app_searc…
lcawl Nov 19, 2021
b597ae5
Remove ROLES_DOCS_LINK from role_mappings.tsx
lcawl Nov 19, 2021
c08b8a3
Adds variables in doc link service
lcawl Nov 19, 2021
46f46f3
Merge branch 'main' into search-url
kibanamachine Nov 22, 2021
e3a0fe4
Add updated doc_links.test.ts
lcawl Nov 22, 2021
c7d4100
Merge branch 'main' into search-url
lcawl Nov 24, 2021
16e65e6
Merge branch 'main' into search-url
kibanamachine Nov 24, 2021
dc3c125
Rebases published API changes
lcawl Nov 25, 2021
408cdab
Merge branch 'main' into search-url
lcawl Nov 29, 2021
8ee5ac4
Merge branch 'main' into search-url
kibanamachine Nov 29, 2021
5870c20
Regenerate due to merge conflict
lcawl Nov 29, 2021
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 @@ -24,6 +24,9 @@ readonly links: {
readonly canvas: {
readonly guide: string;
};
readonly cloud: {
readonly indexManagement: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
Expand Down Expand Up @@ -55,10 +58,64 @@ readonly links: {
readonly install: string;
readonly start: string;
};
readonly appSearch: {
readonly apiRef: string;
readonly apiClients: string;
readonly apiKeys: string;
readonly authentication: string;
readonly crawlRules: string;
readonly curations: string;
readonly duplicateDocuments: string;
readonly entryPoints: string;
readonly guide: string;
readonly indexingDocuments: string;
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
readonly configuration: string;
readonly licenseManagement: string;
readonly mailService: string;
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
readonly customSources: string;
readonly customSourcePermissions: string;
readonly documentPermissions: string;
readonly dropbox: string;
readonly externalIdentities: string;
readonly gitHub: string;
readonly gettingStarted: string;
readonly gmail: string;
readonly googleDrive: string;
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
readonly security: string;
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
readonly heartbeat: {
readonly base: string;
Expand Down

Large diffs are not rendered by default.

129 changes: 123 additions & 6 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class DocLinksService {
const APM_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/apm/`;
const SECURITY_SOLUTION_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/`;
const STACK_GETTING_STARTED = `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack-get-started/${DOC_LINK_VERSION}/`;
const APP_SEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/app-search/${DOC_LINK_VERSION}/`;
const ENTERPRISE_SEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/enterprise-search/${DOC_LINK_VERSION}/`;
const WORKPLACE_SEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/workplace-search/${DOC_LINK_VERSION}/`;

return deepFreeze({
DOC_LINK_VERSION,
Expand All @@ -51,6 +54,9 @@ export class DocLinksService {
canvas: {
guide: `${KIBANA_DOCS}canvas.html`,
},
cloud: {
indexManagement: `${ELASTIC_WEBSITE_URL}/guide/en/cloud/current/ec-configure-index-management.html`,
},
dashboard: {
guide: `${KIBANA_DOCS}dashboard.html`,
drilldowns: `${KIBANA_DOCS}drilldowns.html`,
Expand All @@ -77,10 +83,64 @@ export class DocLinksService {
auditdModule: `${ELASTIC_WEBSITE_URL}guide/en/beats/auditbeat/${DOC_LINK_VERSION}/auditbeat-module-auditd.html`,
systemModule: `${ELASTIC_WEBSITE_URL}guide/en/beats/auditbeat/${DOC_LINK_VERSION}/auditbeat-module-system.html`,
},
appSearch: {
apiRef: `${APP_SEARCH_DOCS}api-reference.html`,
apiClients: `${APP_SEARCH_DOCS}api-clients.html`,
apiKeys: `${APP_SEARCH_DOCS}authentication.html#authentication-api-keys`,
authentication: `${APP_SEARCH_DOCS}authentication.html`,
crawlRules: `${APP_SEARCH_DOCS}crawl-web-content.html#crawl-web-content-manage-crawl-rules`,
curations: `${APP_SEARCH_DOCS}curations-guide.html`,
duplicateDocuments: `${APP_SEARCH_DOCS}web-crawler-reference.html#web-crawler-reference-content-deduplication`,
entryPoints: `${APP_SEARCH_DOCS}crawl-web-content.html#crawl-web-content-manage-entry-points`,
guide: `${APP_SEARCH_DOCS}index.html`,
indexingDocuments: `${APP_SEARCH_DOCS}indexing-documents-guide.html`,
indexingDocumentsSchema: `${APP_SEARCH_DOCS}indexing-documents-guide.html#indexing-documents-guide-schema`,
logSettings: `${APP_SEARCH_DOCS}logs.html`,
metaEngines: `${APP_SEARCH_DOCS}meta-engines-guide.html`,
nativeAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-native-realm`,
precisionTuning: `${APP_SEARCH_DOCS}precision-tuning.html`,
relevanceTuning: `${APP_SEARCH_DOCS}relevance-tuning-guide.html`,
resultSettings: `${APP_SEARCH_DOCS}result-settings-guide.html`,
searchUI: `${APP_SEARCH_DOCS}reference-ui-guide.html`,
security: `${APP_SEARCH_DOCS}security-and-users.html`,
standardAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-standard`,
synonyms: `${APP_SEARCH_DOCS}synonyms-guide.html`,
webCrawler: `${APP_SEARCH_DOCS}web-crawler.html`,
webCrawlerEventLogs: `${APP_SEARCH_DOCS}view-web-crawler-events-logs.html`,
},
enterpriseSearch: {
base: `${ELASTIC_WEBSITE_URL}guide/en/enterprise-search/${DOC_LINK_VERSION}`,
appSearchBase: `${ELASTIC_WEBSITE_URL}guide/en/app-search/${DOC_LINK_VERSION}`,
workplaceSearchBase: `${ELASTIC_WEBSITE_URL}guide/en/workplace-search/${DOC_LINK_VERSION}`,
configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`,
licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`,
mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`,
usersAccess: `${ENTERPRISE_SEARCH_DOCS}users-access.html`,
},
workplaceSearch: {
box: `${WORKPLACE_SEARCH_DOCS}workplace-search-box-connector.html`,
confluenceCloud: `${WORKPLACE_SEARCH_DOCS}workplace-search-confluence-cloud-connector.html`,
confluenceServer: `${WORKPLACE_SEARCH_DOCS}workplace-search-confluence-server-connector.html`,
customSources: `${WORKPLACE_SEARCH_DOCS}workplace-search-custom-api-sources.html`,
customSourcePermissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-custom-api-sources.html#custom-api-source-document-level-access-control`,
documentPermissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-sources-document-permissions.html`,
dropbox: `${WORKPLACE_SEARCH_DOCS}workplace-search-dropbox-connector.html`,
externalIdentities: `${WORKPLACE_SEARCH_DOCS}workplace-search-external-identities-api.html`,
gettingStarted: `${WORKPLACE_SEARCH_DOCS}workplace-search-getting-started.html`,
gitHub: `${WORKPLACE_SEARCH_DOCS}workplace-search-github-connector.html`,
gmail: `${WORKPLACE_SEARCH_DOCS}workplace-search-gmail-connector.html`,
googleDrive: `${WORKPLACE_SEARCH_DOCS}workplace-search-google-drive-connector.html`,
indexingSchedule: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html#_indexing_schedule`,
jiraCloud: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-cloud-connector.html`,
jiraServer: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-server-connector.html`,
nativeAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#elasticsearch-native-realm`,
oneDrive: `${WORKPLACE_SEARCH_DOCS}workplace-search-onedrive-connector.html`,
permissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-permissions.html#organizational-sources-private-sources`,
salesforce: `${WORKPLACE_SEARCH_DOCS}workplace-search-salesforce-connector.html`,
security: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html`,
serviceNow: `${WORKPLACE_SEARCH_DOCS}workplace-search-servicenow-connector.html`,
sharePoint: `${WORKPLACE_SEARCH_DOCS}workplace-search-sharepoint-online-connector.html`,
slack: `${WORKPLACE_SEARCH_DOCS}workplace-search-slack-connector.html`,
standardAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#standard`,
synch: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html`,
zendesk: `${WORKPLACE_SEARCH_DOCS}workplace-search-zendesk-connector.html`,
},
metricbeat: {
base: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}`,
Expand Down Expand Up @@ -550,6 +610,9 @@ export interface DocLinksStart {
readonly canvas: {
readonly guide: string;
};
readonly cloud: {
readonly indexManagement: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
Expand Down Expand Up @@ -581,10 +644,64 @@ export interface DocLinksStart {
readonly install: string;
readonly start: string;
};
readonly appSearch: {
readonly apiRef: string;
readonly apiClients: string;
readonly apiKeys: string;
readonly authentication: string;
readonly crawlRules: string;
readonly curations: string;
readonly duplicateDocuments: string;
readonly entryPoints: string;
readonly guide: string;
readonly indexingDocuments: string;
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
readonly configuration: string;
readonly licenseManagement: string;
readonly mailService: string;
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
readonly customSources: string;
readonly customSourcePermissions: string;
readonly documentPermissions: string;
readonly dropbox: string;
readonly externalIdentities: string;
readonly gitHub: string;
readonly gettingStarted: string;
readonly gmail: string;
readonly googleDrive: string;
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
readonly security: string;
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
readonly heartbeat: {
readonly base: string;
Expand Down
63 changes: 60 additions & 3 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ export interface DocLinksStart {
readonly canvas: {
readonly guide: string;
};
readonly cloud: {
readonly indexManagement: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
Expand Down Expand Up @@ -537,10 +540,64 @@ export interface DocLinksStart {
readonly install: string;
readonly start: string;
};
readonly appSearch: {
readonly apiRef: string;
readonly apiClients: string;
readonly apiKeys: string;
readonly authentication: string;
readonly crawlRules: string;
readonly curations: string;
readonly duplicateDocuments: string;
readonly entryPoints: string;
readonly guide: string;
readonly indexingDocuments: string;
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
readonly configuration: string;
readonly licenseManagement: string;
readonly mailService: string;
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
readonly customSources: string;
readonly customSourcePermissions: string;
readonly documentPermissions: string;
readonly dropbox: string;
readonly externalIdentities: string;
readonly gitHub: string;
readonly gettingStarted: string;
readonly gmail: string;
readonly googleDrive: string;
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
readonly security: string;
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
readonly heartbeat: {
readonly base: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { shallow } from 'enzyme';

import { EuiEmptyPrompt, EuiButton } from '@elastic/eui';

import { docLinks } from '../../../../shared/doc_links';

import { EmptyState } from './';

describe('EmptyState', () => {
Expand All @@ -21,7 +23,7 @@ describe('EmptyState', () => {

expect(wrapper.find('h2').text()).toEqual('No API events in the last 24 hours');
expect(wrapper.find(EuiButton).prop('href')).toEqual(
expect.stringContaining('/api-reference.html')
expect.stringContaining(docLinks.appSearchApis)
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
import React from 'react';

import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';

import { i18n } from '@kbn/i18n';

import { DOCS_PREFIX } from '../../../routes';
import { API_DOCS_URL } from '../../../routes';

export const EmptyState: React.FC = () => (
<EuiEmptyPrompt
Expand All @@ -30,12 +31,7 @@ export const EmptyState: React.FC = () => (
</p>
}
actions={
<EuiButton
size="s"
target="_blank"
iconType="popout"
href={`${DOCS_PREFIX}/api-reference.html`}
>
<EuiButton size="s" target="_blank" iconType="popout" href={API_DOCS_URL}>
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.apiLogs.empty.buttonLabel', {
defaultMessage: 'View the API reference',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { clearFlashMessages, flashSuccessToast } from '../../../../shared/flash_
import { GenericEndpointInlineEditableTable } from '../../../../shared/tables/generic_endpoint_inline_editable_table';
import { InlineEditableTableColumn } from '../../../../shared/tables/inline_editable_table/types';
import { ItemWithAnID } from '../../../../shared/tables/types';
import { DOCS_PREFIX } from '../../../routes';
import { CRAWL_RULES_DOCS_URL } from '../../../routes';
import { CrawlerSingleDomainLogic } from '../crawler_single_domain_logic';
import {
CrawlerPolicies,
Expand All @@ -53,11 +53,7 @@ const DEFAULT_DESCRIPTION = (
defaultMessage="Create a crawl rule to include or exclude pages whose URL matches the rule. Rules run in sequential order, and each URL is evaluated according to the first match. {link}"
values={{
link: (
<EuiLink
href={`${DOCS_PREFIX}/crawl-web-content.html#crawl-web-content-manage-crawl-rules`}
target="_blank"
external
>
<EuiLink href={CRAWL_RULES_DOCS_URL} target="_blank" external>
{i18n.translate(
'xpack.enterpriseSearch.appSearch.crawler.crawlRulesTable.descriptionLinkText',
{ defaultMessage: 'Learn more about crawl rules' }
Expand Down
Loading