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

[COPYEDIT | ILM] Copyedit of text in index lifecycle management UI #2

Merged
merged 1 commit into from
May 22, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ export class Configuration extends Component {
return (
<div>
<EuiDescribedFormGroup
title={<h4>Configuration</h4>}
title={<h4>Configure hot indices</h4>}
titleSize="s"
description="Indices are thought of as &quot;hot&quot; when they are actively being written to."
description="A hot index is actively being written to."
fullWidth
>
<ErrableFormRow
Expand Down Expand Up @@ -131,8 +131,8 @@ export class Configuration extends Component {
The best way to determine how many shards you need is to benchmark
using realistic data and queries on your hardware.{' '}
<EuiLink href="https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right">
Learn more in our docs
</EuiLink>.
Learn more
</EuiLink>
</p>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class TemplateSelection extends PureComponent {
when you create an index.{' '}
<EuiLink href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html">
Learn more
</EuiLink>.
</EuiLink>
</p>
}
>
Expand Down Expand Up @@ -100,7 +100,7 @@ export class TemplateSelection extends PureComponent {
{bootstrapEnabled ? (
<Fragment>
<ErrableFormRow
label="Name your index"
label="Index name"
errorKey={STRUCTURE_INDEX_NAME}
isShowingErrors={isShowingErrors}
errors={errors}
Expand All @@ -114,7 +114,7 @@ export class TemplateSelection extends PureComponent {
/>
</ErrableFormRow>
<ErrableFormRow
label="Name your alias"
label="Alias name"
errorKey={STRUCTURE_ALIAS_NAME}
isShowingErrors={isShowingErrors}
errors={errors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class IndexTemplate extends Component {
if (await this.validate()) {
this.props.done();
} else {
toastNotifications.addDanger('Please fix errors on the page.');
toastNotifications.addDanger('Please fix the errors on the page');
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ export class ColdPhase extends PureComponent {
description={
<Fragment>
<p>
Your read-only index is queried less frequently. Use this phase
when the index no longer needs to be on the most performant hardware.
Your index is queried less frequently
and no longer needs to be on the most performant hardware.
</p>
{isShowingErrors ? (
<EuiTextColor color="danger">
<EuiText>
<p>This phase contains errors that need to be fixed.</p>
<p>This phase contains errors</p>
</EuiText>
</EuiTextColor>
) : null}
Expand Down Expand Up @@ -206,7 +206,7 @@ export class ColdPhase extends PureComponent {
setPhaseData(PHASE_REPLICA_COUNT, warmPhaseReplicaCount)
}
>
Set same as warm phase
Set to same as warm phase
</EuiButtonEmpty>
</EuiFormRow>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ export class DeletePhase extends PureComponent {
description={
<Fragment>
<p>
When your data is no longer useful. Define how long you want to retain it.
Use this phase to define how long to retain your data.
</p>
{isShowingErrors ? (
<EuiTextColor color="danger">
<EuiText>
<p>This phase contains errors that need to be fixed.</p>
<p>This phase contains errors</p>
</EuiText>
</EuiTextColor>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ export class HotPhase extends PureComponent {
description={
<Fragment>
<p>
This phase is required. Your index is being queried and in active writing mode.
This phase is required. Your index is being queried and actively written to.
You can optimize this phase for write throughput.
</p>
{isShowingErrors ? (
<EuiTextColor color="danger">
<EuiText>
<p>This phase contains errors that need to be fixed.</p>
<p>This phase contains errors</p>
</EuiText>
</EuiTextColor>
) : null}
Expand All @@ -94,9 +95,9 @@ export class HotPhase extends PureComponent {
hasEmptyLabelSpace
helpText={
<p>
Setting this to true will rollover the index when it gets too big or too old. The alias will switch to the new index.{' '}
If true, rollover the index when it gets too big or too old. The alias switches to the new index.{' '}
<EuiLink href="https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html">
Learn more.
Learn more
</EuiLink>
</p>
}
Expand All @@ -116,7 +117,7 @@ export class HotPhase extends PureComponent {
<EuiFlexGroup>
<EuiFlexItem style={{ maxWidth: 188 }}>
<ErrableFormRow
label="Maximum index size stored"
label="Maximum index size"
errorKey={PHASE_ROLLOVER_MAX_SIZE_STORED}
isShowingErrors={isShowingErrors}
errors={errors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ export class WarmPhase extends Component {
description={
<Fragment>
<p>
Your index is frequently queried, but is read-only.
Use this phase to optimize for search.Your index is being queried
and in active writing mode.
Your index becomes read-only when it enters the warm phase.
You can optimize this phase for search.
</p>
{isShowingErrors ? (
<EuiTextColor color="danger">
<EuiText>
<p>This phase contains errors that need to be fixed.</p>
<p>This phase contains errors</p>
</EuiText>
</EuiTextColor>
) : null}
Expand Down Expand Up @@ -267,7 +266,7 @@ export class WarmPhase extends Component {
validate();
}}
>
Set same as hot phase
Set to same as hot phase
</EuiButtonEmpty>
</EuiFormRow>
</EuiFlexItem>
Expand All @@ -282,7 +281,7 @@ export class WarmPhase extends Component {
<EuiTextColor color="subdued">
Shrink the index into a new index with fewer primary shards.{' '}
<EuiLink href="https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html#indices-shrink-index">
Learn more.
Learn more
</EuiLink>
</EuiTextColor>
</EuiTitle>
Expand All @@ -295,7 +294,7 @@ export class WarmPhase extends Component {
await setPhaseData(PHASE_SHRINK_ENABLED, e.target.checked);
validate();
}}
label="Enable shrink"
label="Shrink index"
/>

<EuiSpacer size="m" />
Expand Down Expand Up @@ -334,7 +333,7 @@ export class WarmPhase extends Component {
validate();
}}
>
Set same as hot phase
Set to same as hot phase
</EuiButtonEmpty>
</EuiFormRow>
</EuiFlexItem>
Expand All @@ -349,10 +348,10 @@ export class WarmPhase extends Component {
</EuiTitle>
<EuiTitle size="xs">
<EuiTextColor color="subdued">
Reduce the number of segments in your shard by and merging smaller
Reduce the number of segments in your shard by merging smaller
files and clearing deleted ones.{' '}
<EuiLink href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html">
Learn More
Learn more
</EuiLink>
</EuiTextColor>
</EuiTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class PolicyConfiguration extends Component {
if (await this.validate()) {
this.props.done();
} else {
toastNotifications.addDanger('Please fix errors on the page.');
toastNotifications.addDanger('Please the fix errors on the page');
}
};

Expand Down Expand Up @@ -124,12 +124,12 @@ export class PolicyConfiguration extends Component {
<EuiHorizontalRule className="ilmHrule" />
<EuiTitle>
<h4>
{!selectedPolicyName ? 'Create a new policy' : `Edit policy ${selectedPolicyName}`}
{!selectedPolicyName ? 'Create a policy' : `Edit policy ${selectedPolicyName}`}
</h4>
</EuiTitle>
<EuiSpacer size="xs" />
<EuiText color="subdued">
<p>Configure the phases of your data and when to transition between them. Only the hot phase is required.</p>
<p>Configure the phases of your data and when to transition between them.</p>
</EuiText>
<EuiSpacer />
<HotPhase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class Review extends Component {
if (await this.validate()) {
this.props.done();
} else {
toastNotifications.addDanger('Please fix errors on the page.');
toastNotifications.addDanger('Please fix the errors on the page');
}
};

Expand Down Expand Up @@ -148,22 +148,22 @@ export class Review extends Component {
<h3>Review your policy changes</h3>
</EuiTitle>
<EuiText>
<p>Be careful. Your changes will go into effect immediately once you save.</p>
<p>When you save a policy, your changes go into effect immediately.</p>
</EuiText>

<EuiSpacer />

<EuiCallOut
title="This will change template configurations"
title="Your changes affect these template configurations"
color="warning"
>
<h4>{`${affectedIndexTemplates.length} Affected index ${affectedIndexTemplates.length === 1 ? 'template' : 'templates'}`}</h4>
<h4>{`${affectedIndexTemplates.length} Index ${affectedIndexTemplates.length === 1 ? 'template' : 'templates'}`}</h4>
<ul>
{affectedIndexTemplates.map(template => (
<li key={template}>{template}</li>
))}
</ul>
<h4>{`${affectedIndices.length} Affected ${affectedIndices.length === 1 ? 'Index' : 'Indices' }`}</h4>
<h4>{`${affectedIndices.length} ${affectedIndices.length === 1 ? 'Index' : 'Indices' }`}</h4>
{ isLoadingAffectedIndices ? (
<EuiLoadingSpinner size="l"/>
) : (
Expand All @@ -177,10 +177,10 @@ export class Review extends Component {
<Fragment>
<EuiSpacer />
<EuiCallOut
title="This will create a new index alias"
title="This action creates a new index alias"
color="success"
>
<p>Since you decided to bootstrap a new index you&apos;ll want to point to a new alias going forward</p>
<p>You decided to bootstrap a new index. Point to this new alias going forward.</p>
<h3><span className="ilmAlias">{aliasName}</span> is your new alias</h3>
</EuiCallOut>
</Fragment>
Expand Down Expand Up @@ -224,13 +224,13 @@ export class Review extends Component {
{ showSaveChangedMessage ? (
<Fragment>
<EuiTitle size="s">
<h3>Save changes to {selectedPolicyName} policy</h3>
<h3>Save changes to {selectedPolicyName} policy?</h3>
</EuiTitle>
<EuiText>
<p>
<strong>You are editing an existing policy</strong>. This means that any saves you make
will also change any index templates this policy is attached to. You can instead save
these changes and make it a brand new policy that only changes the template you
<strong>You are editing an existing policy</strong>. Any changes you make
will also change index templates that this policy is attached to. Alternately, you can save
these changes in a new policy and only change the template you
selected.
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class Wizard extends Component {
// onClick: () => this.onSelectedStepChanged(2),
// },
{
title: 'Configure policy',
title: 'Configure a policy',
isSelected: this.state.selectedStep === 2,
isComplete: this.state.selectedStep > 2,
disabled: this.state.selectedStep < 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export const validatePhase = (type, phase) => {
!isNumber(phase[PHASE_ROLLOVER_MAX_SIZE_STORED])
) {
errors[PHASE_ROLLOVER_MAX_AGE] = [
'A rollover requires a max age, max docs, or max size.'
'A maximum age is required'
];
errors[PHASE_ROLLOVER_MAX_SIZE_STORED] = [
'A rollover requires a max age, max docs, or max size.'
'A maximum index size is required'
];
}
}
Expand All @@ -73,13 +73,13 @@ export const validatePhase = (type, phase) => {
continue;
}
if (!isNumber(phase[numberedAttribute])) {
errors[numberedAttribute] = ['A number is required.'];
errors[numberedAttribute] = ['A number is required'];
}
else if (phase[numberedAttribute] < 0) {
errors[numberedAttribute] = ['Only positive numbers allowed.'];
errors[numberedAttribute] = ['Only positive numbers are allowed'];
}
else if (numberedAttribute === PHASE_PRIMARY_SHARD_COUNT && phase[numberedAttribute] < 1) {
errors[numberedAttribute] = ['Only positive numbers above 0 are allowed.'];
errors[numberedAttribute] = ['Only positive numbers are allowed'];
}
}
}
Expand All @@ -98,41 +98,41 @@ export const validateLifecycle = state => {
}

if (getBootstrapEnabled(state) && !getIndexName(state)) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_TEMPLATE_SELECTION][STRUCTURE_INDEX_NAME].push('An index name is required.');
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_TEMPLATE_SELECTION][STRUCTURE_INDEX_NAME].push('An index name is required');
}

if (getBootstrapEnabled(state) && !getAliasName(state)) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_TEMPLATE_SELECTION][STRUCTURE_ALIAS_NAME].push('An alias name is required.');
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_TEMPLATE_SELECTION][STRUCTURE_ALIAS_NAME].push('An alias name is required');
}

if (!isNumber(getSelectedPrimaryShardCount(state))) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_CONFIGURATION][
STRUCTURE_PRIMARY_NODES
].push('A value is required.');
].push('A value is required');
}
else if (getSelectedPrimaryShardCount(state) < 1) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_CONFIGURATION][
STRUCTURE_PRIMARY_NODES
].push('Only positive numbers above 0 are allowed.');
].push('Only positive numbers are allowed');
}

if (!isNumber(getSelectedReplicaCount(state))) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_CONFIGURATION][
STRUCTURE_REPLICAS
].push('A value is required.');
].push('A value is required');
}
else if (getSelectedReplicaCount(state) < 0) {
errors[STRUCTURE_INDEX_TEMPLATE][STRUCTURE_CONFIGURATION][
STRUCTURE_REPLICAS
].push('Only positive numbers allowed.');
].push('Only positive numbers are allowed');
}

if (!getSelectedPolicyName(state)) {
errors[STRUCTURE_REVIEW][STRUCTURE_POLICY_NAME].push('A policy name is required.');
errors[STRUCTURE_REVIEW][STRUCTURE_POLICY_NAME].push('A policy name is required');
}

if (getSaveAsNewPolicy(state) && getSelectedOriginalPolicyName(state) === getSelectedPolicyName(state)) {
errors[STRUCTURE_REVIEW][STRUCTURE_POLICY_NAME].push('The policy name must be different.');
errors[STRUCTURE_REVIEW][STRUCTURE_POLICY_NAME].push('The policy name must be different');
}

// if (getSaveAsNewPolicy(state)) {
Expand Down