Skip to content

Commit

Permalink
fix localization, remove comments, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Jun 15, 2021
1 parent 5cc9214 commit af50788
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 44 deletions.
9 changes: 9 additions & 0 deletions src/plugins/index_pattern_management/public/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export const CONFIG_ROLLUPS = 'rollups:enableIndexPatterns';
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const RollupPrompt = () => (
<EuiCallOut color="warning" iconType="help" title="Beta feature">
<p>
{i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text',
'indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text',
{
defaultMessage:
"Kibana's support for rollup index patterns is in beta. You might encounter issues using " +
Expand All @@ -26,7 +26,7 @@ export const RollupPrompt = () => (
</p>
<p>
{i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text',
'indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text',
{
defaultMessage:
'You can match a rollup index pattern against one rollup index and zero or more regular ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ import { RollupPrompt } from './components/rollup_prompt';
import { IndexPatternCreationConfig } from '.';

const rollupIndexPatternTypeName = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultTypeName',
'indexPatternManagement.editRollupIndexPattern.createIndex.defaultTypeName',
{ defaultMessage: 'rollup index pattern' }
);

const rollupIndexPatternButtonText = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonText',
'indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonText',
{ defaultMessage: 'Rollup index pattern' }
);

const rollupIndexPatternButtonDescription = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonDescription',
'indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonDescription',
{ defaultMessage: 'Perform limited aggregations against summarized data' }
);

const rollupIndexPatternNoMatchError = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.noMatchError',
'indexPatternManagement.editRollupIndexPattern.createIndex.noMatchError',
{ defaultMessage: 'Rollup index pattern error: must match one rollup index' }
);

const rollupIndexPatternTooManyMatchesError = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.tooManyMatchesError',
'indexPatternManagement.editRollupIndexPattern.createIndex.tooManyMatchesError',
{ defaultMessage: 'Rollup index pattern error: can only match one rollup index' }
);

const rollupIndexPatternIndexLabel = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.indexLabel',
'indexPatternManagement.editRollupIndexPattern.createIndex.indexLabel',
{ defaultMessage: 'Rollup' }
);

Expand Down Expand Up @@ -128,7 +128,7 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig

if (error) {
const errorMessage = i18n.translate(
'xpack.rollupJobs.editRollupIndexPattern.createIndex.uncaughtError',
'indexPatternManagement.editRollupIndexPattern.createIndex.uncaughtError',
{
defaultMessage: 'Rollup index pattern error: {error}',
values: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
IndexPatternListConfig,
RollupIndexPatternListConfig,
} from './list';

import { CONFIG_ROLLUPS } from '../constants';
interface SetupDependencies {
httpClient: HttpSetup;
uiSettings: CoreSetup['uiSettings'];
Expand All @@ -43,17 +45,10 @@ export class IndexPatternManagementService {
const indexPatternListConfigSetup = this.indexPatternListConfig.setup();
indexPatternListConfigSetup.addListConfig(IndexPatternListConfig);

// todo move to shared plugin
if (uiSettings.get('rollups:enableIndexPatterns')) {
if (uiSettings.get(CONFIG_ROLLUPS)) {
creationManagerSetup.addCreationConfig(RollupIndexPatternCreationConfig);
indexPatternListConfigSetup.addListConfig(RollupIndexPatternListConfig);
}
/*
return {
creation: creationManagerSetup,
list: indexPatternListConfigSetup,
};
*/
}

public start() {
Expand Down
9 changes: 0 additions & 9 deletions x-pack/plugins/rollup/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ export class RollupPlugin implements Plugin {
indexManagement.extensionsService.addToggle(rollupToggleExtension);
}

/*
const isRollupIndexPatternsEnabled = core.uiSettings.get(CONFIG_ROLLUPS);
if (isRollupIndexPatternsEnabled) {
indexPatternManagement.creation.addCreationConfig(RollupIndexPatternCreationConfig);
indexPatternManagement.list.addListConfig(RollupIndexPatternListConfig);
}
*/

if (home) {
home.featureCatalogue.register({
id: 'rollup_jobs',
Expand Down
18 changes: 9 additions & 9 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -18035,15 +18035,15 @@
"xpack.rollupJobs.detailPanel.jobActionMenu.buttonLabel": "管理",
"xpack.rollupJobs.detailPanel.loadingLabel": "ロールアップジョブを読み込み中...",
"xpack.rollupJobs.detailPanel.notFoundLabel": "ロールアップジョブが見つかりません",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonDescription": "要約データに制限された集約を実行します。",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonText": "ロールアップインデックスパターン",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultTypeName": "ロールアップインデックスパターン",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.indexLabel": "ロールアップ",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.noMatchError": "ロールアップインデックスパターンエラー:ロールアップインデックスの 1 つと一致している必要があります",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.tooManyMatchesError": "ロールアップインデックスパターンエラー:一致できるロールアップインデックスは 1 つだけです",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.uncaughtError": "ロールアップインデックスパターンエラー:{error}",
"xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text": "ロールアップインデックスパターンのKibanaのサポートはベータ版です。保存された検索、可視化、ダッシュボードでこれらのパターンを使用すると問題が発生する場合があります。Timelionや機械学習などの一部の高度な機能ではサポートされていません。",
"xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text": "ロールアップインデックスパターンは、1つのロールアップインデックスとゼロ以上の標準インデックスと一致させることができます。ロールアップインデックスパターンでは、メトリック、フィールド、間隔、アグリゲーションが制限されています。ロールアップインデックスは、1つのジョブ構成があるインデックス、または複数のジョブと互換する構成があるインデックスに制限されています。",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonDescription": "要約データに制限された集約を実行します。",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonText": "ロールアップインデックスパターン",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultTypeName": "ロールアップインデックスパターン",
"indexPatternManagement.editRollupIndexPattern.createIndex.indexLabel": "ロールアップ",
"indexPatternManagement.editRollupIndexPattern.createIndex.noMatchError": "ロールアップインデックスパターンエラー:ロールアップインデックスの 1 つと一致している必要があります",
"indexPatternManagement.editRollupIndexPattern.createIndex.tooManyMatchesError": "ロールアップインデックスパターンエラー:一致できるロールアップインデックスは 1 つだけです",
"indexPatternManagement.editRollupIndexPattern.createIndex.uncaughtError": "ロールアップインデックスパターンエラー:{error}",
"indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text": "ロールアップインデックスパターンのKibanaのサポートはベータ版です。保存された検索、可視化、ダッシュボードでこれらのパターンを使用すると問題が発生する場合があります。Timelionや機械学習などの一部の高度な機能ではサポートされていません。",
"indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text": "ロールアップインデックスパターンは、1つのロールアップインデックスとゼロ以上の標準インデックスと一致させることができます。ロールアップインデックスパターンでは、メトリック、フィールド、間隔、アグリゲーションが制限されています。ロールアップインデックスは、1つのジョブ構成があるインデックス、または複数のジョブと互換する構成があるインデックスに制限されています。",
"xpack.rollupJobs.featureCatalogueDescription": "今後の分析用に履歴データを小さなインデックスに要約して格納します。",
"xpack.rollupJobs.indexMgmtBadge.rollupLabel": "ロールアップ",
"xpack.rollupJobs.indexMgmtToggle.toggleLabel": "ロールアップインデックスを含める",
Expand Down
18 changes: 9 additions & 9 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -18276,15 +18276,15 @@
"xpack.rollupJobs.detailPanel.jobActionMenu.buttonLabel": "管理",
"xpack.rollupJobs.detailPanel.loadingLabel": "正在加载汇总/打包作业……",
"xpack.rollupJobs.detailPanel.notFoundLabel": "未找到汇总/打包作业",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonDescription": "针对汇总数据执行有限聚合",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultButtonText": "汇总/打包索引模式",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.defaultTypeName": "汇总/打包索引模式",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.indexLabel": "汇总/打包",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.noMatchError": "汇总/打包索引模式错误:必须匹配一个汇总/打包索引",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.tooManyMatchesError": "汇总/打包索引模式错误:只能匹配一个汇总/打包索引",
"xpack.rollupJobs.editRollupIndexPattern.createIndex.uncaughtError": "汇总索引模式错误:{error}",
"xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text": "Kibana 对汇总/打包索引模式的支持处于公测版状态。将这些模式用于已保存搜索、可视化以及仪表板可能会遇到问题。某些高级功能,如 Timelion 和 Machine Learning,不支持这些模式。",
"xpack.rollupJobs.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text": "可以根据一个汇总/打包索引和零个或更多常规索引匹配汇总/打包索引模式。汇总/打包索引模式的指标、字段、时间间隔和聚合有限。汇总/打包索引仅限于具有一个作业配置或多个作业配置兼容的索引。",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonDescription": "针对汇总数据执行有限聚合",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultButtonText": "汇总/打包索引模式",
"indexPatternManagement.editRollupIndexPattern.createIndex.defaultTypeName": "汇总/打包索引模式",
"indexPatternManagement.editRollupIndexPattern.createIndex.indexLabel": "汇总/打包",
"indexPatternManagement.editRollupIndexPattern.createIndex.noMatchError": "汇总/打包索引模式错误:必须匹配一个汇总/打包索引",
"indexPatternManagement.editRollupIndexPattern.createIndex.tooManyMatchesError": "汇总/打包索引模式错误:只能匹配一个汇总/打包索引",
"indexPatternManagement.editRollupIndexPattern.createIndex.uncaughtError": "汇总索引模式错误:{error}",
"indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph1Text": "Kibana 对汇总/打包索引模式的支持处于公测版状态。将这些模式用于已保存搜索、可视化以及仪表板可能会遇到问题。某些高级功能,如 Timelion 和 Machine Learning,不支持这些模式。",
"indexPatternManagement.editRollupIndexPattern.rollupPrompt.betaCalloutParagraph2Text": "可以根据一个汇总/打包索引和零个或更多常规索引匹配汇总/打包索引模式。汇总/打包索引模式的指标、字段、时间间隔和聚合有限。汇总/打包索引仅限于具有一个作业配置或多个作业配置兼容的索引。",
"xpack.rollupJobs.featureCatalogueDescription": "汇总历史数据并将其存储在较小的索引中以供将来分析。",
"xpack.rollupJobs.indexMgmtBadge.rollupLabel": "汇总/打包",
"xpack.rollupJobs.indexMgmtToggle.toggleLabel": "包括汇总索引",
Expand Down

0 comments on commit af50788

Please sign in to comment.