-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[CCR] Copy edits #29676
Changes from 15 commits
21b38b8
f95b77f
b544ab9
ee721ca
0beee6c
2403120
120e1a3
bf405b1
950bf23
0eba66d
aaa62b0
571a84d
976e521
eea6e2f
aada6bc
ed5bf46
4bbc5d3
f136ebf
a5921d6
f183122
3de1955
d86fcd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) { | ||
|
@@ -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; | ||
|
@@ -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." | ||
/>), | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To edit this |
||
named '{name}'." | ||
values={{ name }} | ||
/>) | ||
}; | ||
|
||
|
@@ -539,7 +546,6 @@ export class AutoFollowPatternFormUI extends PureComponent { | |
|
||
return ( | ||
<Fragment> | ||
<EuiSpacer size="m" /> | ||
<EuiCallOut | ||
title={( | ||
<FormattedMessage | ||
|
@@ -550,6 +556,7 @@ export class AutoFollowPatternFormUI extends PureComponent { | |
color="danger" | ||
iconType="cross" | ||
/> | ||
<EuiSpacer size="l" /> | ||
</Fragment> | ||
); | ||
}; | ||
|
@@ -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) { | ||
|
@@ -592,10 +599,7 @@ export class AutoFollowPatternFormUI extends PureComponent { | |
fill | ||
disabled={isSaveDisabled} | ||
> | ||
<FormattedMessage | ||
id="xpack.crossClusterReplication.autoFollowPatternForm.saveButtonLabel" | ||
defaultMessage="Save" | ||
/> | ||
{saveButtonLabel} | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
|
@@ -623,7 +627,7 @@ export class AutoFollowPatternFormUI extends PureComponent { | |
{renderAutoFollowPatternPrefixSuffix()} | ||
</EuiForm> | ||
{renderFormErrorWarning()} | ||
<EuiSpacer size="l" /> | ||
{this.renderApiErrors()} | ||
{renderActions()} | ||
</Fragment> | ||
); | ||
|
@@ -645,7 +649,6 @@ export class AutoFollowPatternFormUI extends PureComponent { | |
render() { | ||
return ( | ||
<Fragment> | ||
{this.renderApiErrors()} | ||
{this.renderForm()} | ||
{this.renderLoading()} | ||
</Fragment> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,7 @@ export const FollowerIndexForm = injectI18n( | |
apiError: PropTypes.object, | ||
apiStatus: PropTypes.string.isRequired, | ||
remoteClusters: PropTypes.array, | ||
saveButtonLabel: PropTypes.node, | ||
} | ||
|
||
constructor(props) { | ||
|
@@ -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; | ||
|
@@ -343,7 +350,7 @@ export const FollowerIndexForm = injectI18n( | |
|
||
const indexNameLabel = i18n.translate( | ||
'xpack.crossClusterReplication.followerIndexForm.sectionFollowerIndexNameTitle', { | ||
defaultMessage: 'Name' | ||
defaultMessage: 'Follower index' | ||
} | ||
); | ||
|
||
|
@@ -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} | ||
|
@@ -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." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To edit this |
||
named '{name}'." | ||
values={{ name }} | ||
/>) | ||
}; | ||
|
||
|
@@ -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 | ||
|
@@ -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." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
|
@@ -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.." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove second period. Advanced settings control the rate of replication. |
||
/> | ||
</p> | ||
|
||
|
@@ -557,7 +585,6 @@ export const FollowerIndexForm = injectI18n( | |
|
||
return ( | ||
<Fragment> | ||
<EuiSpacer size="m" /> | ||
<EuiCallOut | ||
title={( | ||
<FormattedMessage | ||
|
@@ -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) { | ||
|
@@ -612,10 +639,7 @@ export const FollowerIndexForm = injectI18n( | |
fill | ||
disabled={isSaveDisabled} | ||
> | ||
<FormattedMessage | ||
id="xpack.crossClusterReplication.followerIndexForm.saveButtonLabel" | ||
defaultMessage="Save" | ||
/> | ||
{saveButtonLabel} | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
|
@@ -645,6 +669,7 @@ export const FollowerIndexForm = injectI18n( | |
</EuiForm> | ||
|
||
{renderFormErrorWarning()} | ||
{this.renderApiErrors()} | ||
{renderActions()} | ||
</Fragment> | ||
); | ||
|
@@ -666,7 +691,6 @@ export const FollowerIndexForm = injectI18n( | |
render() { | ||
return ( | ||
<Fragment> | ||
{this.renderApiErrors()} | ||
{this.renderForm()} | ||
{this.renderLoading()} | ||
</Fragment> | ||
|
There was a problem hiding this comment.
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