mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
# Conflicts: # x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.test.tsx # x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/documentation.ts
This commit is contained in:
parent
f47a42d1c5
commit
a4b87bda72
5 changed files with 22 additions and 12 deletions
|
@ -98,6 +98,9 @@ readonly links: {
|
|||
readonly painlessWalkthrough: string;
|
||||
readonly luceneExpressions: string;
|
||||
};
|
||||
readonly search: {
|
||||
readonly sessions: string;
|
||||
};
|
||||
readonly indexPatterns: {
|
||||
readonly loadingData: string;
|
||||
readonly introduction: string;
|
||||
|
|
|
@ -144,6 +144,9 @@ export class DocLinksService {
|
|||
queryDsl: `${ELASTICSEARCH_DOCS}query-dsl.html`,
|
||||
kueryQuerySyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`,
|
||||
},
|
||||
search: {
|
||||
sessions: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/search-sessions.html`,
|
||||
},
|
||||
date: {
|
||||
dateMath: `${ELASTICSEARCH_DOCS}common-options.html#date-math`,
|
||||
},
|
||||
|
@ -356,6 +359,9 @@ export interface DocLinksStart {
|
|||
readonly painlessWalkthrough: string;
|
||||
readonly luceneExpressions: string;
|
||||
};
|
||||
readonly search: {
|
||||
readonly sessions: string;
|
||||
};
|
||||
readonly indexPatterns: {
|
||||
readonly loadingData: string;
|
||||
readonly introduction: string;
|
||||
|
|
|
@ -568,6 +568,9 @@ export interface DocLinksStart {
|
|||
readonly painlessWalkthrough: string;
|
||||
readonly luceneExpressions: string;
|
||||
};
|
||||
readonly search: {
|
||||
readonly sessions: string;
|
||||
};
|
||||
readonly indexPatterns: {
|
||||
readonly loadingData: string;
|
||||
readonly introduction: string;
|
||||
|
|
|
@ -57,9 +57,11 @@ describe('Background Search Session Management Main', () => {
|
|||
|
||||
describe('renders', () => {
|
||||
const docLinks: DocLinksStart = {
|
||||
ELASTIC_WEBSITE_URL: 'boo/',
|
||||
DOC_LINK_VERSION: '#foo',
|
||||
links: {} as any,
|
||||
ELASTIC_WEBSITE_URL: `boo/`,
|
||||
DOC_LINK_VERSION: `#foo`,
|
||||
links: {
|
||||
search: { sessions: `mock-url` } as any,
|
||||
} as any,
|
||||
};
|
||||
|
||||
let main: ReactWrapper;
|
||||
|
@ -93,9 +95,7 @@ describe('Background Search Session Management Main', () => {
|
|||
test('documentation link', () => {
|
||||
const docLink = main.find('a[href]').first();
|
||||
expect(docLink.text()).toBe('Documentation');
|
||||
expect(docLink.prop('href')).toBe(
|
||||
'boo/guide/en/elasticsearch/reference/#foo/async-search-intro.html'
|
||||
);
|
||||
expect(docLink.prop('href')).toBe('mock-url');
|
||||
});
|
||||
|
||||
test('table is present', () => {
|
||||
|
|
|
@ -8,16 +8,14 @@
|
|||
import { DocLinksStart } from 'kibana/public';
|
||||
|
||||
export class AsyncSearchIntroDocumentation {
|
||||
private docsBasePath: string = '';
|
||||
private docUrl: string = '';
|
||||
|
||||
constructor(docs: DocLinksStart) {
|
||||
const { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL } = docs;
|
||||
const docsBase = `${ELASTIC_WEBSITE_URL}guide/en`;
|
||||
// TODO: There should be Kibana documentation link about Search Sessions in Kibana
|
||||
this.docsBasePath = `${docsBase}/elasticsearch/reference/${DOC_LINK_VERSION}`;
|
||||
const { links } = docs;
|
||||
this.docUrl = links.search.sessions;
|
||||
}
|
||||
|
||||
public getElasticsearchDocLink() {
|
||||
return `${this.docsBasePath}/async-search-intro.html`;
|
||||
return `${this.docUrl}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue