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 all 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 @@ -295,20 +302,35 @@ export class AutoFollowPatternFormUI extends PureComponent {
const { remoteClusters, currentUrl } = this.props;

const errorMessages = {
noClusterFound: () => (<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.emptyRemoteClustersCallOutDescription"
defaultMessage="Auto-follow patterns capture indices on remote clusters. You must add a remote cluster."
/>),
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."
/>),
remoteClusterDoesNotExist: () => (<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."
/>)
noClusterFound: () => (
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.emptyRemoteClustersCallOutDescription"
defaultMessage="Auto-follow patterns capture indices on remote clusters."
/>
),
remoteClusterNotConnectedNotEditable: (name) => ({
title: (
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.currentRemoteClusterNotConnectedCallOutTitle"
defaultMessage="Can't edit auto-follow pattern because remote cluster '{name}' is not connected"
values={{ name }}
/>
),
description: (
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.currentRemoteClusterNotConnectedCallOutDescription"
defaultMessage="You can address this by editing the remote cluster."
/>
),
}),
remoteClusterDoesNotExist: (name) => (
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.currentRemoteClusterNotFoundCallOutDescription"
defaultMessage="To edit this auto-follow pattern, you must add a remote cluster
named '{name}'."
values={{ name }}
/>
),
};

return (
Expand Down Expand Up @@ -379,7 +401,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
<p>
<FormattedMessage
id="xpack.crossClusterReplication.autoFollowPatternForm.sectionLeaderIndexPatternsDescription2"
defaultMessage="{note} indices that already exist are not replicated."
defaultMessage="{note} Indices that already exist are not replicated."
values={{ note: (
<strong>
<FormattedMessage
Expand Down Expand Up @@ -539,7 +561,6 @@ export class AutoFollowPatternFormUI extends PureComponent {

return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={(
<FormattedMessage
Expand All @@ -550,6 +571,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
color="danger"
iconType="cross"
/>
<EuiSpacer size="l" />
</Fragment>
);
};
Expand All @@ -558,7 +580,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 +614,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 +642,7 @@ export class AutoFollowPatternFormUI extends PureComponent {
{renderAutoFollowPatternPrefixSuffix()}
</EuiForm>
{renderFormErrorWarning()}
<EuiSpacer size="l" />
{this.renderApiErrors()}
{renderActions()}
</Fragment>
);
Expand All @@ -645,7 +664,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
Loading