diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/__jest__/__snapshots__/create_index_pattern_wizard.test.js.snap b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/__jest__/__snapshots__/create_index_pattern_wizard.test.js.snap index 3365c6f722304..d7378e58d42bf 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/__jest__/__snapshots__/create_index_pattern_wizard.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/__jest__/__snapshots__/create_index_pattern_wizard.test.js.snap @@ -4,6 +4,7 @@ exports[`CreateIndexPatternWizard defaults to the loading state 1`] = `
+
+ Kibana's support for rollup index patterns is in beta. You might encounter + issues using these patterns in saved searches, visualizations, and dashboards. + They are not supported in advanced features, such as Visual Builder, Timelion, + and Machine Learning. +
++ You can match a rollup index pattern against one rollup index and zero or + more regular indices. A rollup index pattern has limited metrics, fields, + intervals, and aggregations. A rollup index is limited to indices that have + one job configuration, or multiple jobs with compatible configurations. +
+ ); diff --git a/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js b/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js index b7cb7eecb5c87..c987b773ca4c9 100644 --- a/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js +++ b/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js @@ -9,6 +9,25 @@ import { IndexPatternCreationConfig } from 'ui/management/index_pattern_creation import { RollupPrompt } from './components/rollup_prompt'; import { setHttpClient, getRollupIndices } from '../services/api'; +import { i18n } from '@kbn/i18n'; + +const rollupIndexPatternTypeName = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultTypeName', + { defaultMessage: 'rollup index pattern' }); + +const rollupIndexPatternButtonText = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonText', + { defaultMessage: 'Rollup index pattern' }); + +const rollupIndexPatternButtonDescription = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonDescription', + { defaultMessage: 'Perform limited aggregations against summarized data' }); + +const rollupIndexPatternNoMatchError = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.noMatchError', + { defaultMessage: 'Rollup index pattern error: must match one rollup index' }); + +const rollupIndexPatternTooManyMatchesError = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.tooManyMatchesError', + { defaultMessage: 'Rollup index pattern error: can only match one rollup index' }); + +const rollupIndexPatternIndexLabel = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.indexLabel', + { defaultMessage: 'Rollup' }); export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig { static key = 'rollup'; @@ -16,8 +35,9 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig constructor(options) { super({ type: 'rollup', - name: 'rollup index pattern', + name: rollupIndexPatternTypeName, showSystemIndices: false, + isBeta: true, ...options, }); @@ -37,9 +57,10 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig async getIndexPatternCreationOption(urlHandler) { await this.settingUp; return this.rollupIndices && this.rollupIndices.length ? { - text: `Rollup index pattern`, - description: `Can perform limited aggregations against summarized data`, + text: rollupIndexPatternButtonText, + description: rollupIndexPatternButtonDescription, testSubj: `createRollupIndexPatternButton`, + isBeta: this.isBeta, onClick: () => { urlHandler('/management/kibana/index?type=rollup'); }, @@ -53,7 +74,7 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig getIndexTags(indexName) { return this.isRollupIndex(indexName) ? [{ key: this.type, - name: 'Rollup', + name: rollupIndexPatternIndexLabel, }] : []; } @@ -67,16 +88,22 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig const rollupIndices = indices.filter(index => this.isRollupIndex(index.name)); if(!rollupIndices.length) { - return ['Rollup index error: must match one rollup index']; + return [rollupIndexPatternNoMatchError]; } else if(rollupIndices.length > 1) { - return ['Rollup index error: can only match one rollup index']; + return [rollupIndexPatternTooManyMatchesError]; } const rollupIndexName = rollupIndices[0].name; const error = this.rollupIndicesCapabilities[rollupIndexName].error; if(error) { - return [`Rollup index error: ${error}`]; + const errorMessage = i18n.translate('xpack.rollupJobs.editRollupIndexPattern.createIndex.uncaughtError', { + defaultMessage: 'Rollup index pattern error: {error}', + values: { + error + } + }); + return [errorMessage]; } this.rollupIndex = rollupIndexName;