From a6818fd0dfd0351e802651004d391038b1402621 Mon Sep 17 00:00:00 2001
From: CJ Cenizal
Date: Mon, 29 Oct 2018 15:15:11 -0700
Subject: [PATCH] [Rollups] Copy improvements (#24528)
---
.../step_index_pattern/step_index_pattern.js | 13 ++---
.../components/field_list/field_list.js | 1 +
.../job_create/steps/components/index.js | 1 +
.../job_create/steps/components/step_error.js | 36 +++++++++++++
.../job_create/steps/step_date_histogram.js | 38 ++++----------
.../job_create/steps/step_histogram.js | 20 ++-----
.../job_create/steps/step_logistics.js | 52 +++++++------------
.../sections/job_create/steps/step_metrics.js | 17 ++----
.../sections/job_create/steps/step_terms.js | 4 +-
.../sections/job_create/steps_config/index.js | 4 +-
.../validate_date_histogram_field.js | 2 +-
.../validate_date_histogram_interval.js | 4 +-
.../validate_histogram_interval.js | 4 +-
.../job_create/steps_config/validate_id.js | 2 +-
.../steps_config/validate_index_pattern.js | 8 +--
.../steps_config/validate_metrics.js | 3 +-
.../steps_config/validate_rollup_cron.js | 2 +-
.../steps_config/validate_rollup_delay.js | 2 +-
.../steps_config/validate_rollup_index.js | 12 ++---
.../steps_config/validate_rollup_page_size.js | 4 +-
20 files changed, 105 insertions(+), 124 deletions(-)
create mode 100644 x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/step_error.js
diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
index d184c099e8fcc..60b5cb2dd8dae 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
+++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
@@ -219,19 +219,12 @@ export class StepIndexPatternComponent extends Component {
}
iconType="help"
color="warning"
- >
-
-
-
-
+ />
);
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/components/field_list/field_list.js b/x-pack/plugins/rollup/public/crud_app/sections/components/field_list/field_list.js
index c528d11573c34..912b945a0d7e0 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/components/field_list/field_list.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/components/field_list/field_list.js
@@ -54,6 +54,7 @@ export const FieldList = ({
toolsRight: addButton ? addButton : undefined,
box: {
incremental: true,
+ placeholder: 'Search',
},
};
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/index.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/index.js
index 6aa485d7bfb82..e5c8eb2e2e17f 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/index.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/index.js
@@ -6,3 +6,4 @@
export { FieldChooser } from './field_chooser';
export { CronEditor } from './cron_editor';
+export { StepError } from './step_error';
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/step_error.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/step_error.js
new file mode 100644
index 0000000000000..487f2d2403898
--- /dev/null
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/components/step_error.js
@@ -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 = (
+
+) }) {
+ return (
+
+
+
+
+ );
+}
+
+StepError.propTypes = {
+ title: PropTypes.node,
+};
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_date_histogram.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_date_histogram.js
index 743b871b8f8b1..2ef947c4444ce 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_date_histogram.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_date_histogram.js
@@ -11,7 +11,6 @@ import moment from 'moment-timezone';
import {
EuiButtonEmpty,
- EuiCallOut,
EuiDescribedFormGroup,
EuiFieldText,
EuiFlexGroup,
@@ -34,6 +33,8 @@ import {
dateHistogramAggregationUrl,
} from '../../../services';
+import { StepError } from './components';
+
const timeZoneOptions = moment.tz.names().map(name => ({
value: name,
text: name,
@@ -85,7 +86,7 @@ export class StepDateHistogramUi extends Component {
@@ -98,7 +99,7 @@ export class StepDateHistogramUi extends Component {
@@ -114,7 +115,7 @@ export class StepDateHistogramUi extends Component {
@@ -127,7 +128,7 @@ export class StepDateHistogramUi extends Component {
@@ -140,7 +141,7 @@ export class StepDateHistogramUi extends Component {
@@ -158,7 +159,7 @@ export class StepDateHistogramUi extends Component {
@@ -247,10 +248,7 @@ export class StepDateHistogramUi extends Component {
@@ -282,7 +280,7 @@ export class StepDateHistogramUi extends Component {
label={(
)}
error={errorDateHistogramInterval}
@@ -331,21 +329,7 @@ export class StepDateHistogramUi extends Component {
return null;
}
- return (
-
-
-
- )}
- color="danger"
- iconType="cross"
- />
-
- );
+ return ;
}
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_histogram.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_histogram.js
index 2d921c7dd30da..edcd8109ec5d3 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_histogram.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_histogram.js
@@ -10,7 +10,6 @@ import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import {
EuiButtonEmpty,
- EuiCallOut,
EuiDescribedFormGroup,
EuiFieldNumber,
EuiFlexGroup,
@@ -31,6 +30,7 @@ import {
import {
FieldChooser,
+ StepError,
} from './components';
export class StepHistogramUi extends Component {
@@ -98,7 +98,7 @@ export class StepHistogramUi extends Component {
@@ -230,21 +230,7 @@ export class StepHistogramUi extends Component {
return null;
}
- return (
-
-
-
- )}
- color="danger"
- iconType="cross"
- />
-
- );
+ return ;
}
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js
index bcb3222ca8617..8cc55499e0923 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js
@@ -10,7 +10,6 @@ import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import {
EuiButtonEmpty,
- EuiCallOut,
EuiDescribedFormGroup,
EuiFieldNumber,
EuiFieldText,
@@ -28,7 +27,7 @@ import {
import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from 'ui/index_patterns';
import { INDEX_ILLEGAL_CHARACTERS_VISIBLE } from 'ui/indices';
import { logisticalDetailsUrl, cronUrl } from '../../../services';
-import { CronEditor } from './components';
+import { CronEditor, StepError } from './components';
const indexPatternIllegalCharacters = INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.join(' ');
const indexIllegalCharacters = INDEX_ILLEGAL_CHARACTERS_VISIBLE.join(' ');
@@ -99,7 +98,7 @@ export class StepLogisticsUi extends Component {
);
@@ -111,14 +110,14 @@ export class StepLogisticsUi extends Component {
* }}
/>
{indexPatternIllegalCharacters} }}
/>
@@ -152,7 +151,7 @@ export class StepLogisticsUi extends Component {
label={(
)}
error={errorRollupCron}
@@ -167,7 +166,7 @@ export class StepLogisticsUi extends Component {
) }}
@@ -219,7 +218,7 @@ export class StepLogisticsUi extends Component {
@@ -272,7 +271,7 @@ export class StepLogisticsUi extends Component {
@@ -350,7 +349,7 @@ export class StepLogisticsUi extends Component {
description={(
)}
fullWidth
@@ -388,7 +387,7 @@ export class StepLogisticsUi extends Component {
helpText={(
{indexIllegalCharacters} }}
/>
)}
@@ -418,7 +417,7 @@ export class StepLogisticsUi extends Component {
)}
@@ -433,7 +432,7 @@ export class StepLogisticsUi extends Component {
@@ -443,7 +442,7 @@ export class StepLogisticsUi extends Component {
id="xpack.rollupJobs.create.stepLogistics.sectionPageSizeDescription"
defaultMessage={`
A larger page size
- will roll up data more quickly, but will require more memory during processing.
+ will roll up data quicker, but requires more memory.
`}
/>
)}
@@ -485,8 +484,9 @@ export class StepLogisticsUi extends Component {
)}
@@ -496,7 +496,7 @@ export class StepLogisticsUi extends Component {
label={(
)}
error={errorRollupDelay}
@@ -506,7 +506,7 @@ export class StepLogisticsUi extends Component {
@@ -535,21 +535,7 @@ export class StepLogisticsUi extends Component {
return null;
}
- return (
-
-
-
- )}
- color="danger"
- iconType="cross"
- />
-
- );
+ return ;
}
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_metrics.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_metrics.js
index 3a1788682101a..5dae20b2e889e 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_metrics.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_metrics.js
@@ -10,7 +10,6 @@ import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import {
EuiButtonEmpty,
- EuiCallOut,
EuiCheckbox,
EuiFlexGroup,
EuiFlexItem,
@@ -29,6 +28,7 @@ import {
import {
FieldChooser,
+ StepError,
} from './components';
export class StepMetricsUi extends Component {
@@ -190,8 +190,8 @@ export class StepMetricsUi extends Component {
@@ -252,16 +252,7 @@ export class StepMetricsUi extends Component {
return null;
}
- return (
-
-
-
-
- );
+ return ;
}
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_terms.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_terms.js
index 8df9da5724d37..07673aea04056 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_terms.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps/step_terms.js
@@ -98,8 +98,8 @@ export class StepTermsUi extends Component {
id="xpack.rollupJobs.create.stepTermsDescription"
defaultMessage={`
Select the fields you want to bucket using terms aggregations. This can be
- potentially costly for high-cardinality groups such as IP addresses, especially
- if the time-bucket is particularly sparse.
+ costly for high-cardinality fields such as IP addresses,
+ if the time bucket is sparse.
`}
/>
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/index.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/index.js
index 29629c1eb3507..20bdb6402d40d 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/index.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/index.js
@@ -44,7 +44,9 @@ export const stepIdToStepConfigMap = {
// Every week on Saturday, at 00:00:00
rollupCron: '0 0 0 ? * 7',
simpleRollupCron: '0 0 0 ? * 7',
- rollupPageSize: '',
+ // The best page size boils down to how much memory the user has, e.g. how many buckets should
+ // be accumulated at one time. 1000 is probably a safe size without being too small.
+ rollupPageSize: 1000,
// Though the API doesn't require a delay, in many real-world cases, servers will go down for
// a few hours as they're being restarted. A delay of 1d would allow them that period to reboot
// and the "expense" is pretty negligible in most cases: 1 day of extra non-rolled-up data.
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_field.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_field.js
index 2e1c2628f1054..16400a5dcfc3a 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_field.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_field.js
@@ -12,7 +12,7 @@ export function validateDateHistogramField(dateHistogramField) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_interval.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_interval.js
index 1fc275e4f607f..c118007817498 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_interval.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_date_histogram_interval.js
@@ -17,7 +17,7 @@ export function validateDateHistogramInterval(dateHistogramInterval) {
return [(
)];
}
@@ -29,7 +29,7 @@ export function validateDateHistogramInterval(dateHistogramInterval) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_histogram_interval.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_histogram_interval.js
index 57d52984ae341..468e4b067cfce 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_histogram_interval.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_histogram_interval.js
@@ -17,7 +17,7 @@ export function validateHistogramInterval(histogram, histogramInterval) {
return [(
)];
}
@@ -26,7 +26,7 @@ export function validateHistogramInterval(histogram, histogramInterval) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_id.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_id.js
index ca67ab9e22a40..9cfa1fb5eebe3 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_id.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_id.js
@@ -12,7 +12,7 @@ export function validateId(id) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_index_pattern.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_index_pattern.js
index 97a9bccc70623..fcf8ea0ad5130 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_index_pattern.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_index_pattern.js
@@ -14,7 +14,7 @@ export function validateIndexPattern(indexPattern, rollupIndex) {
return [(
)];
}
@@ -23,7 +23,7 @@ export function validateIndexPattern(indexPattern, rollupIndex) {
return [(
)];
}
@@ -40,7 +40,7 @@ export function validateIndexPattern(indexPattern, rollupIndex) {
return [(
{illegalCharacters.join(' ')} }}
/>
)];
@@ -50,7 +50,7 @@ export function validateIndexPattern(indexPattern, rollupIndex) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_metrics.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_metrics.js
index 815585941c056..cf07d57dc1860 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_metrics.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_metrics.js
@@ -22,7 +22,8 @@ export function validateMetrics(metrics) {
return [(
)];
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_cron.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_cron.js
index a508de7cda03f..4df3ab8ef774d 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_cron.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_cron.js
@@ -13,7 +13,7 @@ export function validateRollupCron(rollupCron) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_delay.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_delay.js
index 52690f4b566aa..26f6d0bdfcfc7 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_delay.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_delay.js
@@ -25,7 +25,7 @@ export function validateRollupDelay(rollupDelay) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_index.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_index.js
index cb7d99400b3fd..a5e6271e87182 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_index.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_index.js
@@ -14,7 +14,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
)];
}
@@ -23,7 +23,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
)];
}
@@ -40,7 +40,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
{illegalCharacters.join(' ')} }}
/>
)];
@@ -50,7 +50,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
)];
}
@@ -59,7 +59,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
)];
}
@@ -68,7 +68,7 @@ export function validateRollupIndex(rollupIndex, indexPattern) {
return [(
)];
}
diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_page_size.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_page_size.js
index c371578e4e5de..8ebbdb2d3f5dc 100644
--- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_page_size.js
+++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/steps_config/validate_rollup_page_size.js
@@ -12,7 +12,7 @@ export function validateRollupPageSize(rollupPageSize) {
return [(
)];
}
@@ -21,7 +21,7 @@ export function validateRollupPageSize(rollupPageSize) {
return [(
)];
}