Skip to content

Commit

Permalink
Fix copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Oct 26, 2018
1 parent 5df9747 commit ddef89f
Show file tree
Hide file tree
Showing 20 changed files with 104 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,12 @@ export class StepIndexPatternComponent extends Component {
<EuiCallOut
title={<FormattedMessage
id="kbn.management.createIndexPattern.step.warningHeader"
defaultMessage="Whoops!"
defaultMessage="There's already an index pattern called {query}"
values={{ query }}
/>}
iconType="help"
color="warning"
>
<p>
<FormattedMessage
id="kbn.management.createIndexPattern.step.warningLabel"
defaultMessage="There's already an index pattern called `{query}`"
values={{ query }}
/>
</p>
</EuiCallOut>
/>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const FieldList = ({
toolsRight: addButton ? addButton : undefined,
box: {
incremental: true,
placeholder: 'Search',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

export { FieldChooser } from './field_chooser';
export { CronEditor } from './cron_editor';
export { StepError } from './step_error';
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';

import {
EuiCallOut,
EuiSpacer,
} from '@elastic/eui';

export function StepError({ title = (
<FormattedMessage
id="xpack.rollupJobs.create.stepErrorTitle"
defaultMessage="Fix errors before continuing."
/>
) }) {
return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={title}
color="danger"
iconType="cross"
/>
</Fragment>
);
}

StepError.propTypes = {
title: PropTypes.node,
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import moment from 'moment-timezone';

import {
EuiButtonEmpty,
EuiCallOut,
EuiDescribedFormGroup,
EuiFieldText,
EuiFlexGroup,
Expand All @@ -34,6 +33,8 @@ import {
dateHistogramAggregationUrl,
} from '../../../services';

import { StepError } from './components';

const timeZoneOptions = moment.tz.names().map(name => ({
value: name,
text: name,
Expand Down Expand Up @@ -85,7 +86,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.preferFixedWarningDayLabel"
defaultMessage="Consider using 24h instead of 1d. This will allow for more flexible queries."
defaultMessage="Consider using 24h instead of 1d. This allows for more flexible queries."
/>
</p>
</EuiTextColor>
Expand All @@ -98,7 +99,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.preferFixedWarningHourLabel"
defaultMessage="Consider using 60m instead of 1h. This will allow for more flexible queries."
defaultMessage="Consider using 60m instead of 1h. This allows for more flexible queries."
/>
</p>
</EuiTextColor>
Expand All @@ -114,7 +115,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.preferFixedWarningYearLabel"
defaultMessage="Consider using the d unit instead of y. This will allow for more flexible queries."
defaultMessage="Consider using the d unit instead of y. This allows for more flexible queries."
/>
</p>
</EuiTextColor>
Expand All @@ -127,7 +128,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.preferFixedWarningMonthLabel"
defaultMessage="Consider using the d unit instead of M. This will allow for more flexible queries."
defaultMessage="Consider using the d unit instead of M. This allows for more flexible queries."
/>
</p>
</EuiTextColor>
Expand All @@ -140,7 +141,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.preferFixedWarningWeekLabel"
defaultMessage="Consider using the d unit instead of w. This will allow for more flexible queries."
defaultMessage="Consider using the d unit instead of w. This allows for more flexible queries."
/>
</p>
</EuiTextColor>
Expand All @@ -158,7 +159,7 @@ export class StepDateHistogramUi extends Component {
<p>
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldInterval.helpExampleLabel"
defaultMessage="Example intervals: 1000ms, 30s, 20m, 24h, 2d, 1w, 1M, 1y"
defaultMessage="Example sizes: 1000ms, 30s, 20m, 24h, 2d, 1w, 1M, 1y"
/>
</p>
</Fragment>
Expand Down Expand Up @@ -247,10 +248,7 @@ export class StepDateHistogramUi extends Component {
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.sectionDataSourceDescription"
defaultMessage={`
Which field contains the date histogram data and how large should its time buckets be?
Note that smaller, more granular intervals take up proportionally more space.
You can also customize the time zone stored with the rolled-up documents.
The default time zone is UTC.
Note that smaller time buckets take up proportionally more space.
`}
/>
</p>
Expand Down Expand Up @@ -282,7 +280,7 @@ export class StepDateHistogramUi extends Component {
label={(
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.fieldIntervalLabel"
defaultMessage="Interval"
defaultMessage="Time bucket size"
/>
)}
error={errorDateHistogramInterval}
Expand Down Expand Up @@ -331,21 +329,7 @@ export class StepDateHistogramUi extends Component {
return null;
}

return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={(
<FormattedMessage
id="xpack.rollupJobs.create.stepDateHistogram.stepErrorTitle"
defaultMessage="Fix errors before going to next step"
/>
)}
color="danger"
iconType="cross"
/>
</Fragment>
);
return <StepError />;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { injectI18n, FormattedMessage } from '@kbn/i18n/react';

import {
EuiButtonEmpty,
EuiCallOut,
EuiDescribedFormGroup,
EuiFieldNumber,
EuiFlexGroup,
Expand All @@ -31,6 +30,7 @@ import {

import {
FieldChooser,
StepError,
} from './components';

export class StepHistogramUi extends Component {
Expand Down Expand Up @@ -98,7 +98,7 @@ export class StepHistogramUi extends Component {
<FormattedMessage
id="xpack.rollupJobs.create.stepHistogramDescription"
defaultMessage={`
Select the fields you want to bucket using numeric histogram intervals.
Select the fields you want to bucket using numeric intervals.
`}
/>
</p>
Expand Down Expand Up @@ -230,21 +230,7 @@ export class StepHistogramUi extends Component {
return null;
}

return (
<Fragment>
<EuiSpacer size="m" />
<EuiCallOut
title={(
<FormattedMessage
id="xpack.rollupJobs.create.stepGroups.stepErrorTitle"
defaultMessage="Fix errors before going to next step"
/>
)}
color="danger"
iconType="cross"
/>
</Fragment>
);
return <StepError />;
}
}

Expand Down
Loading

0 comments on commit ddef89f

Please sign in to comment.