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

[CCR] Copy edits #29676

Merged
merged 22 commits into from
Feb 2, 2019
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
21b38b8
Use 'Resume/pause data replication' in context menu and row actions.
cjcenizal Jan 30, 2019
f95b77f
Update copy of 'Update' confirm modal for a paused follower index.
cjcenizal Jan 31, 2019
b544ab9
Update copy of 'Update' confirm modal for an active follower index.
cjcenizal Jan 31, 2019
ee721ca
Update copy of 'Pause data replication' confirm modal.
cjcenizal Jan 31, 2019
0beee6c
Update copy of 'Resume data replication' confirm modal.
cjcenizal Jan 31, 2019
2403120
Update copy for permissions check.
cjcenizal Jan 31, 2019
120e1a3
Update copy of table empty state.
cjcenizal Jan 31, 2019
bf405b1
Update copy around tables.
cjcenizal Jan 31, 2019
950bf23
Update form copy.
cjcenizal Jan 31, 2019
0eba66d
Update copy for RemoteClustersFormField callouts.
cjcenizal Jan 31, 2019
aaa62b0
Convert 'data replication' -> 'replication'.
cjcenizal Jan 31, 2019
571a84d
Update copy for Unfollow confirm modal.
cjcenizal Jan 31, 2019
976e521
Update copy for form API error and Auto-follow Patterns table.
cjcenizal Jan 31, 2019
eea6e2f
Update form save button labels to be 'Create' and 'Update'.
cjcenizal Jan 31, 2019
aada6bc
Move API errors to bottom of form, into same posiion as sync validati…
cjcenizal Jan 31, 2019
ed5bf46
Fix i18n error.
cjcenizal Jan 31, 2019
4bbc5d3
Update copy with feedback from Gail.
cjcenizal Jan 31, 2019
f136ebf
Fix bug with remoteClusterNotConnectedEditable throwing an error.
cjcenizal Feb 1, 2019
a5921d6
Rephrase 'replication of leader index' -> 'replication to leader index'.
cjcenizal Feb 1, 2019
f183122
Tweak leader index description to reinforce relationship with remote …
cjcenizal Feb 1, 2019
3de1955
Tweak leader index description to clarify role of leader index and fo…
cjcenizal Feb 1, 2019
d86fcd0
Merge branch 'feature/ccr' into ccr/copy-edits
cjcenizal Feb 1, 2019
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
7 changes: 6 additions & 1 deletion src/ui/public/indices/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@

import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from 'ui/index_patterns';

export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.concat(',');
export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [ ...INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE ];

// Insert the comma into the middle, so it doesn't look as if it has grammatical meaning when
// these characters are rendered in the UI.
const insertionIndex = Math.floor(INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.length / 2);
INDEX_ILLEGAL_CHARACTERS_VISIBLE.splice(insertionIndex, 0, ',');
30 changes: 18 additions & 12 deletions x-pack/plugins/cross_cluster_replication/public/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Component } from 'react';
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { Route, Switch, Redirect } from 'react-router-dom';
import chrome from 'ui/chrome';
Expand All @@ -18,6 +18,7 @@ import {
EuiFlexItem,
EuiLoadingSpinner,
EuiPageContent,
EuiSpacer,
EuiTitle,
} from '@elastic/eui';

Expand Down Expand Up @@ -160,15 +161,19 @@ export const App = injectI18n(

if (fetchPermissionError) {
return (
<SectionError
title={(
<FormattedMessage
id="xpack.crossClusterReplication.app.permissionCheckErrorTitle"
defaultMessage="Error checking permissions"
/>
)}
error={fetchPermissionError}
/>
<Fragment>
<SectionError
title={(
<FormattedMessage
id="xpack.crossClusterReplication.app.permissionCheckErrorTitle"
defaultMessage="Error checking permissions"
/>
)}
error={fetchPermissionError}
/>

<EuiSpacer size="m" />
</Fragment>
);
}

Expand All @@ -182,14 +187,15 @@ export const App = injectI18n(
<h2>
<FormattedMessage
id="xpack.crossClusterReplication.app.deniedPermissionTitle"
defaultMessage="Permission denied"
defaultMessage="You're missing cluster privileges"
/>
</h2>}
body={
<p>
<FormattedMessage
id="xpack.crossClusterReplication.app.deniedPermissionDescription"
defaultMessage="You do not have required cluster privileges ({clusterPrivileges}) for Cross Cluster Replication."
defaultMessage="To use Cross Cluster Replication, you must have {clusterPrivileges,
plural, one {this cluster privilege} other {these cluster privileges}}: {clusterPrivileges}."
values={{ clusterPrivileges: missingClusterPrivileges.join(', ') }}
/>
</p>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
apiStatus: PropTypes.string.isRequired,
currentUrl: PropTypes.string.isRequired,
remoteClusters: PropTypes.array,
saveButtonLabel: PropTypes.node,
}

constructor(props) {
Expand Down Expand Up @@ -216,9 +217,15 @@ export class AutoFollowPatternFormUI extends PureComponent {
if (apiError) {
const title = intl.formatMessage({
id: 'xpack.crossClusterReplication.autoFollowPatternForm.savingErrorTitle',
defaultMessage: 'Error creating auto-follow pattern',
defaultMessage: `Can't create auto-follow pattern`,
});
return <SectionError title={title} error={apiError} />;

return (
<Fragment>
<SectionError title={title} error={apiError} />
<EuiSpacer size="l" />
</Fragment>
);
}

return null;
Expand Down Expand Up @@ -301,13 +308,13 @@ export class AutoFollowPatternFormUI extends PureComponent {
/>),
remoteClusterNotConnectedNotEditable: () => (<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.currentRemoteClusterNotConnectedCallOutDescription"
defaultMessage="You need to connect it before editing this auto-follow pattern. Edit the remote cluster to
fix the problem."
defaultMessage="The remote cluster must be connected to edit this auto-follow pattern."
/>),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't edit auto-follow pattern because remote cluster 'test' is not connected.

You can address this by editing the remote cluster.

Edit remote cluster

remoteClusterDoesNotExist: () => (<FormattedMessage
remoteClusterDoesNotExist: (name) => (<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.currentRemoteClusterNotFoundCallOutDescription"
defaultMessage="It might have been removed. In order to edit this auto-follow pattern,
you need to add a remote cluster with the same name."
defaultMessage="Before you can edit this auto-follow pattern, you must add a remote cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

To edit this

named '{name}'."
values={{ name }}
/>)
};

Expand Down Expand Up @@ -539,7 +546,6 @@ export class AutoFollowPatternFormUI extends PureComponent {

return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={(
<FormattedMessage
Expand All @@ -550,6 +556,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
color="danger"
iconType="cross"
/>
<EuiSpacer size="l" />
</Fragment>
);
};
Expand All @@ -558,7 +565,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
* Form Actions
*/
const renderActions = () => {
const { apiStatus } = this.props;
const { apiStatus, saveButtonLabel } = this.props;
const { areErrorsVisible } = this.state;

if (apiStatus === API_STATUS.SAVING) {
Expand Down Expand Up @@ -592,10 +599,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
fill
disabled={isSaveDisabled}
>
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.saveButtonLabel"
defaultMessage="Save"
/>
{saveButtonLabel}
</EuiButton>
</EuiFlexItem>

Expand Down Expand Up @@ -623,7 +627,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
{renderAutoFollowPatternPrefixSuffix()}
</EuiForm>
{renderFormErrorWarning()}
<EuiSpacer size="l" />
{this.renderApiErrors()}
{renderActions()}
</Fragment>
);
Expand All @@ -645,7 +649,6 @@ export class AutoFollowPatternFormUI extends PureComponent {
render() {
return (
<Fragment>
{this.renderApiErrors()}
{this.renderForm()}
{this.renderLoading()}
</Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const byteUnitsHelpText = (
<a href={byteUnitsUrl} target="_blank">
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.advancedSettings.byteUnitsHelpTextLinkMessage"
defaultMessage="Learn more."
defaultMessage="Learn more"
/>
</a>
) }}
Expand All @@ -33,7 +33,7 @@ const timeUnitsHelpText = (
<a href={timeUnitsUrl} target="_blank">
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.advancedSettings.timeUnitsHelpTextLinkMessage"
defaultMessage="Learn more."
defaultMessage="Learn more"
/>
</a>
) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const FollowerIndexForm = injectI18n(
apiError: PropTypes.object,
apiStatus: PropTypes.string.isRequired,
remoteClusters: PropTypes.array,
saveButtonLabel: PropTypes.node,
}

constructor(props) {
Expand Down Expand Up @@ -288,20 +289,26 @@ export const FollowerIndexForm = injectI18n(
if (apiError) {
const title = intl.formatMessage({
id: 'xpack.crossClusterReplication.followerIndexForm.savingErrorTitle',
defaultMessage: 'Error creating follower index',
defaultMessage: `Can't create follower index`,
});
const { leaderIndex } = this.state.followerIndex;
const error = apiError.status === 404
? {
data: {
message: intl.formatMessage({
id: 'xpack.crossClusterReplication.followerIndexForm.leaderIndexNotFoundError',
defaultMessage: `The leader index '{leaderIndex}' you want to replicate from does not exist.`,
defaultMessage: `The leader index '{leaderIndex}' does not exist.`,
}, { leaderIndex })
}
}
: apiError;
return <SectionError title={title} error={error} />;

return (
<Fragment>
<SectionError title={title} error={error} />
<EuiSpacer size="l" />
</Fragment>
);
}

return null;
Expand Down Expand Up @@ -343,7 +350,7 @@ export const FollowerIndexForm = injectI18n(

const indexNameLabel = i18n.translate(
'xpack.crossClusterReplication.followerIndexForm.sectionFollowerIndexNameTitle', {
defaultMessage: 'Name'
defaultMessage: 'Follower index'
}
);

Expand All @@ -359,7 +366,7 @@ export const FollowerIndexForm = injectI18n(
)}
label={indexNameLabel}
description={i18n.translate('xpack.crossClusterReplication.followerIndexForm.sectionFollowerIndexNameDescription', {
defaultMessage: 'A name for the follower index.'
defaultMessage: 'A unique name for your index.'
})}
helpText={indexNameHelpText}
isLoading={isValidatingIndexName}
Expand All @@ -382,13 +389,13 @@ export const FollowerIndexForm = injectI18n(
/>),
remoteClusterNotConnectedNotEditable: () => (<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.currentRemoteClusterNotConnectedCallOutDescription"
defaultMessage="You need to connect it before editing this follower index. Edit the remote cluster to
fix the problem."
defaultMessage="The remote cluster must be connected to edit this follower index."
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't edit follower index because remote cluster 'text' is not connected.

You can address this by editing the remote cluster.

Edit remote cluster

/>),
remoteClusterDoesNotExist: () => (<FormattedMessage
remoteClusterDoesNotExist: (name) => (<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.currentRemoteClusterNotFoundCallOutDescription"
defaultMessage="It might have been removed. In order to edit this follower index,
you need to add a remote cluster with the same name."
defaultMessage="Before you can edit this follower index, you must add a remote cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

To edit this

named '{name}'."
values={{ name }}
/>)
};

Expand All @@ -407,7 +414,7 @@ export const FollowerIndexForm = injectI18n(
description={(
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.sectionRemoteClusterDescription"
defaultMessage="The remote cluster to replicate your leader index from."
defaultMessage="The cluster that contains the index to replicate."
/>
)}
fullWidth
Expand Down Expand Up @@ -449,9 +456,31 @@ export const FollowerIndexForm = injectI18n(
</EuiTitle>
)}
label={leaderIndexLabel}
description={i18n.translate('xpack.crossClusterReplication.followerIndexForm.sectionLeaderIndexDescription', {
defaultMessage: 'The leader index you want to replicate from the remote cluster.'
})}
description={(
<Fragment>
<p>
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.sectionLeaderIndexDescription"
defaultMessage="The index you want to replicate."
/>
</p>

<p>
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.sectionLeaderIndexDescription2"
defaultMessage="{note} the leader index must already exist."
Copy link
Contributor

Choose a reason for hiding this comment

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

Capitalize The

values={{ note: (
<strong>
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.sectionLeaderIndexDescription2.noteLabel"
defaultMessage="Note:"
/>
</strong>
) }}
/>
</p>
</Fragment>
)}
helpText={(
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.indexNameHelpLabel"
Expand Down Expand Up @@ -489,8 +518,7 @@ export const FollowerIndexForm = injectI18n(
<p>
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.advancedSettingsDescription"
defaultMessage="Customize advanced settings to control the rate at which data is replicated.
If you don't customize them, default advanced settings will be applied."
defaultMessage="Advanced settings control the rate at which data is replicated.."
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove second period.

Advanced settings control the rate of replication.

/>
</p>

Expand Down Expand Up @@ -557,7 +585,6 @@ export const FollowerIndexForm = injectI18n(

return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={(
<FormattedMessage
Expand All @@ -578,7 +605,7 @@ export const FollowerIndexForm = injectI18n(
* Form Actions
*/
const renderActions = () => {
const { apiStatus } = this.props;
const { apiStatus, saveButtonLabel } = this.props;
const { areErrorsVisible } = this.state;

if (apiStatus === API_STATUS.SAVING) {
Expand Down Expand Up @@ -612,10 +639,7 @@ export const FollowerIndexForm = injectI18n(
fill
disabled={isSaveDisabled}
>
<FormattedMessage
id="xpack.crossClusterReplication.followerIndexForm.saveButtonLabel"
defaultMessage="Save"
/>
{saveButtonLabel}
</EuiButton>
</EuiFlexItem>

Expand Down Expand Up @@ -645,6 +669,7 @@ export const FollowerIndexForm = injectI18n(
</EuiForm>

{renderFormErrorWarning()}
{this.renderApiErrors()}
{renderActions()}
</Fragment>
);
Expand All @@ -666,7 +691,6 @@ export const FollowerIndexForm = injectI18n(
render() {
return (
<Fragment>
{this.renderApiErrors()}
{this.renderForm()}
{this.renderLoading()}
</Fragment>
Expand Down
Loading