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

[App Search] Version documentation links #83245

Merged
merged 3 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/common/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import { SemVer } from 'semver';
import pkg from '../../../../package.json';

export const CURRENT_VERSION = new SemVer(pkg.version as string);
export const CURRENT_MAJOR_VERSION = CURRENT_VERSION.major;
export const CURRENT_MAJOR_VERSION = `${CURRENT_VERSION.major}.${CURRENT_VERSION.minor}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottybollinger FYI - links using this const for URLs were previously faulty. They were generating links that looked like

https://www.elastic.co/guide/en/app-search/7/
instead of
https://www.elastic.co/guide/en/app-search/7.9/

I should have fixed it here but let me know if you see any issues.

Also the var name is technically not correct now so IDK if we should change it lol. Is CURRENT_MAJOR_MINOR_VERSION too verbose? Maybe we should do CURRENT_FULL_VERSION and CURRENT_VERSION?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will just leave this var name for now but let me know if you want to change this and I'll open a new PR

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import { i18n } from '@kbn/i18n';
import { DOCS_PREFIX } from '../../routes';

export const CREDENTIALS_TITLE = i18n.translate(
'xpack.enterpriseSearch.appSearch.credentials.title',
Expand Down Expand Up @@ -100,4 +101,4 @@ export const TOKEN_TYPE_INFO = [

export const FLYOUT_ARIA_LABEL_ID = 'credentialsFlyoutTitle';

export const DOCS_HREF = 'https://www.elastic.co/guide/en/app-search/current/authentication.html';
export const DOCS_HREF = `${DOCS_PREFIX}/authentication.html`;
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { i18n } from '@kbn/i18n';
import { EuiLink, EuiSpacer, EuiSwitch, EuiText, EuiTextColor, EuiTitle } from '@elastic/eui';
import { useActions, useValues } from 'kea';

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

import { LogRetentionLogic } from './log_retention_logic';
import { AnalyticsLogRetentionMessage, ApiLogRetentionMessage } from './messaging';
import { LogRetentionOptions } from './types';
Expand Down Expand Up @@ -41,10 +43,7 @@ export const LogRetentionPanel: React.FC = () => {
{i18n.translate('xpack.enterpriseSearch.appSearch.settings.logRetention.description', {
defaultMessage: 'Manage the default write settings for API Logs and Analytics.',
})}{' '}
<EuiLink
href="https://www.elastic.co/guide/en/app-search/current/logs.html"
target="_blank"
>
<EuiLink href={`${DOCS_PREFIX}/logs.html`} target="_blank">
{i18n.translate('xpack.enterpriseSearch.appSearch.settings.logRetention.learnMore', {
defaultMessage: 'Learn more about retention settings.',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import { APP_SEARCH_PLUGIN } from '../../../../../common/constants';
import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide';
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import { DOCS_PREFIX } from '../../routes';
import GettingStarted from './assets/getting_started.png';

export const SetupGuide: React.FC = () => (
<SetupGuideLayout
productName={APP_SEARCH_PLUGIN.NAME}
productEuiIcon="logoAppSearch"
standardAuthLink="https://www.elastic.co/guide/en/app-search/current/security-and-users.html#app-search-self-managed-security-and-user-management-standard"
elasticsearchNativeAuthLink="https://www.elastic.co/guide/en/app-search/current/security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-native-realm"
standardAuthLink={`${DOCS_PREFIX}/security-and-users.html#app-search-self-managed-security-and-user-management-standard`}
elasticsearchNativeAuthLink={`${DOCS_PREFIX}/security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-native-realm`}
>
<SetPageChrome
trail={[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

import { generatePath } from 'react-router-dom';

import { CURRENT_MAJOR_VERSION } from '../../../common/version';

export const DOCS_PREFIX = `https://www.elastic.co/guide/en/app-search/${CURRENT_MAJOR_VERSION}`;

export const ROOT_PATH = '/';
export const SETUP_GUIDE_PATH = '/setup_guide';
export const SETTINGS_PATH = '/settings/account';
Expand Down