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

Refine Upgrade Assistant copy. #115472

Merged
merged 14 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from 10 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
readonly links: {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly upgrade: {
readonly upgradingElasticStack: string;
};
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
Expand Down
7 changes: 7 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class DocLinksService {
public start({ injectedMetadata }: StartDeps): DocLinksStart {
const DOC_LINK_VERSION = injectedMetadata.getKibanaBranch();
const ELASTIC_WEBSITE_URL = 'https://www.elastic.co/';
const STACK_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/${DOC_LINK_VERSION}/`;
const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`;
const FLEET_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/fleet/${DOC_LINK_VERSION}/`;
Expand All @@ -34,6 +35,9 @@ export class DocLinksService {
links: {
settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`,
elasticStackGetStarted: `${STACK_GETTING_STARTED}get-started-elastic-stack.html`,
upgrade: {
upgradingElasticStack: `${STACK_DOCS}upgrading-elastic-stack.html`,
},
apm: {
kibanaSettings: `${KIBANA_DOCS}apm-settings-in-kibana.html`,
supportedServiceMaps: `${KIBANA_DOCS}service-maps.html#service-maps-supported`,
Expand Down Expand Up @@ -520,6 +524,9 @@ export interface DocLinksStart {
readonly links: {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly upgrade: {
readonly upgradingElasticStack: string;
};
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
Expand Down
3 changes: 3 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ export interface DocLinksStart {
readonly links: {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly upgrade: {
readonly upgradingElasticStack: string;
};
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ describe('Overview - Fix deprecation logs step', () => {
expect(find('hasWarningsCallout').text()).toContain('10');
});

test('No deprecation warnings', async () => {
test('No deprecation issues', async () => {
httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse({
count: 0,
});
Expand All @@ -282,7 +282,7 @@ describe('Overview - Fix deprecation logs step', () => {
component.update();

expect(exists('noWarningsCallout')).toBe(true);
expect(find('noWarningsCallout').text()).toContain('No deprecation warnings');
expect(find('noWarningsCallout').text()).toContain('No deprecation issues');
});

test('Handles errors and can retry', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { setupEnvironment, kibanaVersion } from '../helpers';
import { setupEnvironment } from '../helpers';
import { OverviewTestBed, setupOverviewPage } from './overview.helpers';

describe('Overview Page', () => {
Expand All @@ -22,12 +22,11 @@ describe('Overview Page', () => {
});

describe('Documentation links', () => {
test('Has a whatsNew link and it references nextMajor version', () => {
test('Has a whatsNew link and it references target version', () => {
const { exists, find } = testBed;
const nextMajor = kibanaVersion.major + 1;

expect(exists('whatsNewLink')).toBe(true);
expect(find('whatsNewLink').text()).toContain(`${nextMajor}.0`);
expect(find('whatsNewLink').text()).toContain('8');
});

test('Has a link for upgrade assistant in page header', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const i18nTexts = {
'xpack.upgradeAssistant.esDeprecations.indexSettings.resolutionTooltipLabel',
{
defaultMessage:
'Resolve this deprecation by removing settings from this index. This is an automated resolution.',
'Resolve this issue by removing settings from this index. This issue can be resolved automatically.',
}
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const i18nTexts = {
'xpack.upgradeAssistant.esDeprecations.mlSnapshots.resolutionTooltipLabel',
{
defaultMessage:
'Resolve this deprecation by upgrading or deleting a job model snapshot. This is an automated resolution.',
'Resolve this issue by upgrading or deleting a job model snapshot. This issue can be resolved automatically.',
}
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const CustomTypeNameWarningCheckbox: React.FunctionComponent<WarningCheck
description={
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningDetail"
defaultMessage="Mapping types are no longer supported in 8.0. Ensure no application code or scripts rely on {mappingType}."
defaultMessage="Mapping types are no longer supported in Elastic 8.x. Ensure no application code or scripts rely on {mappingType}."
values={{
mappingType: <EuiCode>{meta!.typeName as string}</EuiCode>,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const i18nTexts = {
'xpack.upgradeAssistant.esDeprecations.reindex.resolutionTooltipLabel',
{
defaultMessage:
'Resolve this deprecation by reindexing this index. This is an automated resolution.',
'Resolve this issue by reindexing this index. This issue can be resolved automatically.',
}
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const i18nTexts = {
}),
pageDescription: i18n.translate('xpack.upgradeAssistant.esDeprecations.pageDescription', {
defaultMessage:
'Resolve all critical issues before upgrading. Before making changes, ensure you have a current snapshot of your cluster. Some issues may require reindexing to resolve. ',
'Resolve all critical issues before upgrading. Click to view and resolve each issue. Before making changes, ensure you have a current snapshot of your cluster. Indices created before 7.0 must be reindexed or removed. To start multiple reindexing tasks in a single request, use the Kibana batch reindexing API.',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@debadair @gchaps I inserted "Click to view and resolve each issue" for parity with the description on the Kibana deprecations page.

Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit. I prefer this text without the "Click to view and resolve each issue." because the length of this message is so long.

}),
isLoading: i18n.translate('xpack.upgradeAssistant.esDeprecations.loadingText', {
defaultMessage: 'Loading deprecation issues…',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const i18nTexts = {
manualCellTooltipLabel: i18n.translate(
'xpack.upgradeAssistant.esDeprecations.reindex.manualCellTooltipLabel',
{
defaultMessage: 'Resolve this deprecation manually.',
defaultMessage: 'This issue needs to be resolved manually.',
}
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,10 @@ const i18nTexts = {
defaultMessage: 'Resolution in progress…',
}
),
quickResolveCalloutTitle: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.flyout.quickResolveCalloutTitle',
{
defaultMessage: 'Quick resolve action available',
}
),
quickResolveErrorTitle: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.flyout.quickResolveErrorTitle',
{
defaultMessage: 'Error resolving deprecation',
}
),
quickResolveCalloutDescription: (
quickResolveCalloutTitle: (
<FormattedMessage
id="xpack.upgradeAssistant.kibanaDeprecations.flyout.quickResolveCalloutDescription"
defaultMessage="The steps to resolve this issue may be automated with {quickResolve} action below."
id="xpack.upgradeAssistant.kibanaDeprecations.flyout.quickResolveCalloutTitle"
defaultMessage="Click {quickResolve} to fix this issue automatically."
values={{
quickResolve: (
<strong>
Expand All @@ -95,10 +83,16 @@ const i18nTexts = {
}}
/>
),
quickResolveErrorTitle: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.flyout.quickResolveErrorTitle',
{
defaultMessage: 'Error resolving issue',
}
),
manualFixTitle: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.flyout.manualFixTitle',
{
defaultMessage: 'Fix manually',
defaultMessage: 'How to fix',
}
),
};
Expand Down Expand Up @@ -181,9 +175,7 @@ export const DeprecationDetailsFlyout = ({
color="primary"
iconType="iInCircle"
data-test-subj="quickResolveCallout"
>
<p>{i18nTexts.quickResolveCalloutDescription}</p>
</EuiCallOut>
/>

<EuiSpacer />
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import uuid from 'uuid';
import { withRouter, RouteComponentProps } from 'react-router-dom';
import { EuiPageContent, EuiPageHeader, EuiSpacer, EuiCallOut } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { METRIC_TYPE } from '@kbn/analytics';

import type { DomainDeprecationDetails } from 'kibana/public';
Expand All @@ -30,21 +29,10 @@ const i18nTexts = {
pageTitle: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.pageTitle', {
defaultMessage: 'Kibana deprecation issues',
}),
pageDescription: (
<FormattedMessage
id="xpack.upgradeAssistant.kibanaDeprecations.pageDescription"
defaultMessage="You must resolve all critical issues before upgrading. Follow the instructions or use {quickResolve} to fix issues automatically."
values={{
quickResolve: (
<strong>
{i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.quickResolveText', {
defaultMessage: 'Quick Resolve',
})}
</strong>
),
}}
/>
),
pageDescription: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.pageDescription', {
defaultMessage:
'Resolve all critical issues before upgrading. Click to view and resolve each issue.',
}),
docLinkText: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.docLinkText', {
defaultMessage: 'Documentation',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const i18nTexts = {
manualCellTooltipLabel: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.table.manualCellTooltipLabel',
{
defaultMessage: 'Resolve this deprecation manually.',
defaultMessage: 'This issue needs to be resolved manually.',
}
),
automatedCellLabel: i18n.translate(
Expand Down Expand Up @@ -59,7 +59,7 @@ const i18nTexts = {
automatedCellTooltipLabel: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.table.automatedCellTooltipLabel',
{
defaultMessage: 'This is an automated resolution.',
defaultMessage: 'This issue can be resolved automatically.',
}
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const OnPremBackup: React.FunctionComponent = () => {
<EuiText>
<p>
{i18n.translate('xpack.upgradeAssistant.overview.backupStepDescription', {
defaultMessage: 'Back up your data before addressing any deprecation issues.',
defaultMessage: 'Make sure you have a current snapshot before making any changes.',
})}
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ interface Props {
setIsComplete: OverviewStepProps['setIsComplete'];
}

interface StepProps extends OverviewStepProps {
nextMajor: number;
}

const FixIssuesStep: FunctionComponent<Props> = ({ setIsComplete }) => {
// We consider ES and Kibana issues to be fixed when there are 0 critical issues.
const [isEsFixed, setIsEsFixed] = useState(false);
Expand All @@ -54,10 +50,9 @@ const FixIssuesStep: FunctionComponent<Props> = ({ setIsComplete }) => {
};

export const getFixIssuesStep = ({
nextMajor,
isComplete,
setIsComplete,
}: StepProps): EuiStepProps => {
}: OverviewStepProps): EuiStepProps => {
const status = isComplete ? 'complete' : 'incomplete';

return {
Expand All @@ -70,8 +65,7 @@ export const getFixIssuesStep = ({
<p>
<FormattedMessage
id="xpack.upgradeAssistant.overview.fixIssuesStepDescription"
defaultMessage="Update your Elasticsearch and Kibana deployments to be compatible with {nextMajor}.0. Critical issues must be resolved before you upgrade. Warning issues can be ignored at your discretion."
values={{ nextMajor }}
defaultMessage="Update your Elasticsearch and Kibana deployments to be compatible with Elastic 8.x. Critical issues must be resolved before you upgrade. Warning issues can be ignored at your discretion."
/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const i18nTexts = {
defaultMessage: 'Error',
}),
buttonLabel: i18n.translate('xpack.upgradeAssistant.overview.deprecationLogs.buttonLabel', {
defaultMessage: 'Enable deprecation logging and indexing',
defaultMessage: 'Enable deprecation log collection',
}),
loadingLogsLabel: i18n.translate('xpack.upgradeAssistant.overview.loadingLogsLabel', {
defaultMessage: 'Loading log collection state…',
defaultMessage: 'Loading deprecation log collection state…',
}),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const i18nTexts = {
calloutTitle: (warningsCount: number, previousCheck: string) => (
<FormattedMessage
id="xpack.upgradeAssistant.overview.verifyChanges.calloutTitle"
defaultMessage="{warningsCount, plural, =0 {No} other {{warningsCount}}} deprecation {warningsCount, plural, one {warning} other {warnings}} since {previousCheck}"
defaultMessage="{warningsCount, plural, =0 {No} other {{warningsCount}}} deprecation {warningsCount, plural, one {issue} other {issues}} since {previousCheck}"
values={{
warningsCount,
previousCheck: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const i18nTexts = {
apiCompatibilityNoteBody: (docLink: string) => (
<FormattedMessage
id="xpack.upgradeAssistant.overview.apiCompatibilityNoteBody"
defaultMessage="We recommend you resolve all deprecation issues before upgrading. However, it can be challenging to ensure all requests are fixed. For additional safety, include API version compatibility headers in your requests. {learnMoreLink}."
defaultMessage="We recommend you resolve all deprecation issues before upgrading. If needed, you can apply API compatibility headers to requests that use deprecated features. {learnMoreLink}."
values={{
learnMoreLink: (
<EuiLink href={docLink} target="_blank">
Expand All @@ -66,7 +66,7 @@ const i18nTexts = {
'xpack.upgradeAssistant.overview.deprecationLogs.deprecationWarningBody',
{
defaultMessage:
'Go to your logs directory to view the deprecation logs or enable log collecting to see them in the UI.',
'Go to your logs directory to view the deprecation logs or enable deprecation log collection to see them in Kibana.',
}
),
deniedPrivilegeTitle: i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
export interface SystemIndicesFlyoutProps {
closeFlyout: () => void;
data: SystemIndicesMigrationStatus;
nextMajor: number;
}

const i18nTexts = {
Expand All @@ -46,12 +45,13 @@ const i18nTexts = {
flyoutTitle: i18n.translate('xpack.upgradeAssistant.overview.systemIndices.flyoutTitle', {
defaultMessage: 'Migrate system indices',
}),
flyoutDescription: (nextMajor: number) =>
i18n.translate('xpack.upgradeAssistant.overview.systemIndices.flyoutDescription', {
flyoutDescription: i18n.translate(
'xpack.upgradeAssistant.overview.systemIndices.flyoutDescription',
{
defaultMessage:
'Migrate the indices that store information for the following features before you upgrade to {nextMajor}.0.',
values: { nextMajor },
}),
'Migrate the indices that store information for the following features before you upgrade.',
}
),
migrationCompleteLabel: i18n.translate(
'xpack.upgradeAssistant.overview.systemIndices.migrationCompleteLabel',
{
Expand Down Expand Up @@ -157,7 +157,7 @@ const columns = [
},
];

export const SystemIndicesFlyout = ({ closeFlyout, data, nextMajor }: SystemIndicesFlyoutProps) => {
export const SystemIndicesFlyout = ({ closeFlyout, data }: SystemIndicesFlyoutProps) => {
return (
<>
<EuiFlyoutHeader hasBorder>
Expand All @@ -167,7 +167,7 @@ export const SystemIndicesFlyout = ({ closeFlyout, data, nextMajor }: SystemIndi
</EuiFlyoutHeader>
<EuiFlyoutBody data-test-subj="flyoutDetails">
<EuiText>
<p>{i18nTexts.flyoutDescription(nextMajor)}</p>
<p>{i18nTexts.flyoutDescription}</p>
</EuiText>
<EuiSpacer size="l" />
<EuiInMemoryTable<SystemIndicesMigrationFeature>
Expand Down
Loading