[TSVB] (Step 2) Shim new platform - renaming tsvb -> vis_type_timeseries (#44981)

This commit is contained in:
Alexey Antonov 2019-09-09 17:43:05 +03:00 committed by Artyom Gospodarsky
parent dbc687c8f9
commit 5887526723
386 changed files with 1651 additions and 1643 deletions

View file

@ -23,7 +23,7 @@
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": "src/legacy/core_plugins/timelion",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"kbnESQuery": "packages/kbn-es-query",
"inspector": "src/plugins/inspector",
"kibana-react": "src/plugins/kibana_react",

View file

@ -1,127 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import _ from 'lodash';
import { i18n } from '@kbn/i18n';
export const lookup = {
count: i18n.translate('tsvb.aggLookup.countLabel', { defaultMessage: 'Count' }),
calculation: i18n.translate('tsvb.aggLookup.calculationLabel', { defaultMessage: 'Calculation' }),
std_deviation: i18n.translate('tsvb.aggLookup.deviationLabel', {
defaultMessage: 'Std. Deviation',
}),
variance: i18n.translate('tsvb.aggLookup.varianceLabel', { defaultMessage: 'Variance' }),
sum_of_squares: i18n.translate('tsvb.aggLookup.sumOfSqLabel', { defaultMessage: 'Sum of Sq.' }),
avg: i18n.translate('tsvb.aggLookup.averageLabel', { defaultMessage: 'Average' }),
max: i18n.translate('tsvb.aggLookup.maxLabel', { defaultMessage: 'Max' }),
min: i18n.translate('tsvb.aggLookup.minLabel', { defaultMessage: 'Min' }),
sum: i18n.translate('tsvb.aggLookup.sumLabel', { defaultMessage: 'Sum' }),
percentile: i18n.translate('tsvb.aggLookup.percentileLabel', { defaultMessage: 'Percentile' }),
percentile_rank: i18n.translate('tsvb.aggLookup.percentileRankLabel', {
defaultMessage: 'Percentile Rank',
}),
cardinality: i18n.translate('tsvb.aggLookup.cardinalityLabel', { defaultMessage: 'Cardinality' }),
value_count: i18n.translate('tsvb.aggLookup.valueCountLabel', { defaultMessage: 'Value Count' }),
derivative: i18n.translate('tsvb.aggLookup.derivativeLabel', { defaultMessage: 'Derivative' }),
cumulative_sum: i18n.translate('tsvb.aggLookup.cumulativeSumLabel', {
defaultMessage: 'Cumulative Sum',
}),
moving_average: i18n.translate('tsvb.aggLookup.movingAverageLabel', {
defaultMessage: 'Moving Average',
}),
avg_bucket: i18n.translate('tsvb.aggLookup.overallAverageLabel', {
defaultMessage: 'Overall Average',
}),
min_bucket: i18n.translate('tsvb.aggLookup.overallMinLabel', { defaultMessage: 'Overall Min' }),
max_bucket: i18n.translate('tsvb.aggLookup.overallMaxLabel', { defaultMessage: 'Overall Max' }),
sum_bucket: i18n.translate('tsvb.aggLookup.overallSumLabel', { defaultMessage: 'Overall Sum' }),
variance_bucket: i18n.translate('tsvb.aggLookup.overallVarianceLabel', {
defaultMessage: 'Overall Variance',
}),
sum_of_squares_bucket: i18n.translate('tsvb.aggLookup.overallSumOfSqLabel', {
defaultMessage: 'Overall Sum of Sq.',
}),
std_deviation_bucket: i18n.translate('tsvb.aggLookup.overallStdDeviationLabel', {
defaultMessage: 'Overall Std. Deviation',
}),
series_agg: i18n.translate('tsvb.aggLookup.seriesAggLabel', { defaultMessage: 'Series Agg' }),
math: i18n.translate('tsvb.aggLookup.mathLabel', { defaultMessage: 'Math' }),
serial_diff: i18n.translate('tsvb.aggLookup.serialDifferenceLabel', {
defaultMessage: 'Serial Difference',
}),
filter_ratio: i18n.translate('tsvb.aggLookup.filterRatioLabel', {
defaultMessage: 'Filter Ratio',
}),
positive_only: i18n.translate('tsvb.aggLookup.positiveOnlyLabel', {
defaultMessage: 'Positive Only',
}),
static: i18n.translate('tsvb.aggLookup.staticValueLabel', { defaultMessage: 'Static Value' }),
top_hit: i18n.translate('tsvb.aggLookup.topHitLabel', { defaultMessage: 'Top Hit' }),
};
const pipeline = [
'calculation',
'derivative',
'cumulative_sum',
'moving_average',
'avg_bucket',
'min_bucket',
'max_bucket',
'sum_bucket',
'variance_bucket',
'sum_of_squares_bucket',
'std_deviation_bucket',
'series_agg',
'math',
'serial_diff',
'positive_only',
];
const byType = {
_all: lookup,
pipeline: pipeline,
basic: _.omit(lookup, pipeline),
metrics: _.pick(lookup, ['count', 'avg', 'min', 'max', 'sum', 'cardinality', 'value_count']),
};
export function isBasicAgg(item) {
return _.includes(Object.keys(byType.basic), item.type);
}
export function createOptions(type = '_all', siblings = []) {
let aggs = byType[type];
if (!aggs) aggs = byType._all;
let enablePipelines = siblings.some(isBasicAgg);
if (siblings.length <= 1) enablePipelines = false;
return _(aggs)
.map((label, value) => {
const disabled = _.includes(pipeline, value) ? !enablePipelines : false;
return {
label: disabled
? i18n.translate('tsvb.aggLookup.addPipelineAggDescription', {
defaultMessage: '{label} (use the "+" button to add this pipeline agg)',
values: { label },
})
: label,
value,
disabled,
};
})
.value();
}

View file

@ -0,0 +1,127 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import _ from 'lodash';
import { i18n } from '@kbn/i18n';
export const lookup = {
count: i18n.translate('visTypeTimeseries.aggLookup.countLabel', { defaultMessage: 'Count' }),
calculation: i18n.translate('visTypeTimeseries.aggLookup.calculationLabel', { defaultMessage: 'Calculation' }),
std_deviation: i18n.translate('visTypeTimeseries.aggLookup.deviationLabel', {
defaultMessage: 'Std. Deviation',
}),
variance: i18n.translate('visTypeTimeseries.aggLookup.varianceLabel', { defaultMessage: 'Variance' }),
sum_of_squares: i18n.translate('visTypeTimeseries.aggLookup.sumOfSqLabel', { defaultMessage: 'Sum of Sq.' }),
avg: i18n.translate('visTypeTimeseries.aggLookup.averageLabel', { defaultMessage: 'Average' }),
max: i18n.translate('visTypeTimeseries.aggLookup.maxLabel', { defaultMessage: 'Max' }),
min: i18n.translate('visTypeTimeseries.aggLookup.minLabel', { defaultMessage: 'Min' }),
sum: i18n.translate('visTypeTimeseries.aggLookup.sumLabel', { defaultMessage: 'Sum' }),
percentile: i18n.translate('visTypeTimeseries.aggLookup.percentileLabel', { defaultMessage: 'Percentile' }),
percentile_rank: i18n.translate('visTypeTimeseries.aggLookup.percentileRankLabel', {
defaultMessage: 'Percentile Rank',
}),
cardinality: i18n.translate('visTypeTimeseries.aggLookup.cardinalityLabel', { defaultMessage: 'Cardinality' }),
value_count: i18n.translate('visTypeTimeseries.aggLookup.valueCountLabel', { defaultMessage: 'Value Count' }),
derivative: i18n.translate('visTypeTimeseries.aggLookup.derivativeLabel', { defaultMessage: 'Derivative' }),
cumulative_sum: i18n.translate('visTypeTimeseries.aggLookup.cumulativeSumLabel', {
defaultMessage: 'Cumulative Sum',
}),
moving_average: i18n.translate('visTypeTimeseries.aggLookup.movingAverageLabel', {
defaultMessage: 'Moving Average',
}),
avg_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallAverageLabel', {
defaultMessage: 'Overall Average',
}),
min_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallMinLabel', { defaultMessage: 'Overall Min' }),
max_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallMaxLabel', { defaultMessage: 'Overall Max' }),
sum_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallSumLabel', { defaultMessage: 'Overall Sum' }),
variance_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallVarianceLabel', {
defaultMessage: 'Overall Variance',
}),
sum_of_squares_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallSumOfSqLabel', {
defaultMessage: 'Overall Sum of Sq.',
}),
std_deviation_bucket: i18n.translate('visTypeTimeseries.aggLookup.overallStdDeviationLabel', {
defaultMessage: 'Overall Std. Deviation',
}),
series_agg: i18n.translate('visTypeTimeseries.aggLookup.seriesAggLabel', { defaultMessage: 'Series Agg' }),
math: i18n.translate('visTypeTimeseries.aggLookup.mathLabel', { defaultMessage: 'Math' }),
serial_diff: i18n.translate('visTypeTimeseries.aggLookup.serialDifferenceLabel', {
defaultMessage: 'Serial Difference',
}),
filter_ratio: i18n.translate('visTypeTimeseries.aggLookup.filterRatioLabel', {
defaultMessage: 'Filter Ratio',
}),
positive_only: i18n.translate('visTypeTimeseries.aggLookup.positiveOnlyLabel', {
defaultMessage: 'Positive Only',
}),
static: i18n.translate('visTypeTimeseries.aggLookup.staticValueLabel', { defaultMessage: 'Static Value' }),
top_hit: i18n.translate('visTypeTimeseries.aggLookup.topHitLabel', { defaultMessage: 'Top Hit' }),
};
const pipeline = [
'calculation',
'derivative',
'cumulative_sum',
'moving_average',
'avg_bucket',
'min_bucket',
'max_bucket',
'sum_bucket',
'variance_bucket',
'sum_of_squares_bucket',
'std_deviation_bucket',
'series_agg',
'math',
'serial_diff',
'positive_only',
];
const byType = {
_all: lookup,
pipeline: pipeline,
basic: _.omit(lookup, pipeline),
metrics: _.pick(lookup, ['count', 'avg', 'min', 'max', 'sum', 'cardinality', 'value_count']),
};
export function isBasicAgg(item) {
return _.includes(Object.keys(byType.basic), item.type);
}
export function createOptions(type = '_all', siblings = []) {
let aggs = byType[type];
if (!aggs) aggs = byType._all;
let enablePipelines = siblings.some(isBasicAgg);
if (siblings.length <= 1) enablePipelines = false;
return _(aggs)
.map((label, value) => {
const disabled = _.includes(pipeline, value) ? !enablePipelines : false;
return {
label: disabled
? i18n.translate('visTypeTimeseries.aggLookup.addPipelineAggDescription', {
defaultMessage: '{label} (use the "+" button to add this pipeline agg)',
values: { label },
})
: label,
value,
disabled,
};
})
.value();
}

View file

@ -37,31 +37,37 @@ const paths = [
];
export function calculateLabel(metric, metrics) {
if (!metric)
return i18n.translate('tsvb.calculateLabel.unknownLabel', { defaultMessage: 'Unknown' });
if (metric.alias) return metric.alias;
if (!metric) {
return i18n.translate('visTypeTimeseries.calculateLabel.unknownLabel', { defaultMessage: 'Unknown' });
}
if (metric.alias) {
return metric.alias;
}
if (metric.type === 'count')
return i18n.translate('tsvb.calculateLabel.countLabel', { defaultMessage: 'Count' });
if (metric.type === 'count') {
return i18n.translate('visTypeTimeseries.calculateLabel.countLabel', { defaultMessage: 'Count' });
}
if (metric.type === 'calculation') {
return i18n.translate('tsvb.calculateLabel.bucketScriptsLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.bucketScriptsLabel', {
defaultMessage: 'Bucket Script',
});
}
if (metric.type === 'math')
return i18n.translate('tsvb.calculateLabel.mathLabel', { defaultMessage: 'Math' });
if (metric.type === 'math') {
return i18n.translate('visTypeTimeseries.calculateLabel.mathLabel', { defaultMessage: 'Math' });
}
if (metric.type === 'series_agg') {
return i18n.translate('tsvb.calculateLabel.seriesAggLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.seriesAggLabel', {
defaultMessage: 'Series Agg ({metricFunction})',
values: { metricFunction: metric.function },
});
}
if (metric.type === 'filter_ratio')
return i18n.translate('tsvb.calculateLabel.filterRatioLabel', {
if (metric.type === 'filter_ratio') {
return i18n.translate('visTypeTimeseries.calculateLabel.filterRatioLabel', {
defaultMessage: 'Filter Ratio',
});
}
if (metric.type === 'static') {
return i18n.translate('tsvb.calculateLabel.staticValueLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.staticValueLabel', {
defaultMessage: 'Static Value of {metricValue}',
values: { metricValue: metric.value },
});
@ -78,7 +84,7 @@ export function calculateLabel(metric, metrics) {
const percentileValueMatch = /\[([0-9\.]+)\]$/;
const matches = metric.field.match(percentileValueMatch);
if (matches) {
return i18n.translate('tsvb.calculateLabel.lookupMetricTypeOfTargetWithAdditionalLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.lookupMetricTypeOfTargetWithAdditionalLabel', {
defaultMessage: '{lookupMetricType} of {targetLabel} ({additionalLabel})',
values: {
lookupMetricType: lookup[metric.type],
@ -88,13 +94,13 @@ export function calculateLabel(metric, metrics) {
});
}
}
return i18n.translate('tsvb.calculateLabel.lookupMetricTypeOfTargetLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.lookupMetricTypeOfTargetLabel', {
defaultMessage: '{lookupMetricType} of {targetLabel}',
values: { lookupMetricType: lookup[metric.type], targetLabel },
});
}
return i18n.translate('tsvb.calculateLabel.lookupMetricTypeOfMetricFieldRankLabel', {
return i18n.translate('visTypeTimeseries.calculateLabel.lookupMetricTypeOfMetricFieldRankLabel', {
defaultMessage: '{lookupMetricType} of {metricField}',
values: { lookupMetricType: lookup[metric.type], metricField: metric.field },
});

View file

@ -1,16 +1,16 @@
.tvbError__title,
.tvbError__additional,
.tvbError__stack {
margin-top: $euiSizeS;
}
// EUITODO: Convert to EuiCodeBlock
.tvbError__stack {
padding: $euiSizeS;
background: $euiCodeBlockBackgroundColor;
color: $euiCodeBlockColor;
line-height: $euiLineHeight;
font-family: $euiCodeFontFamily;
font-weight: $euiFontWeightRegular;
white-space: pre-wrap;
}
.tvbError__title,
.tvbError__additional,
.tvbError__stack {
margin-top: $euiSizeS;
}
// EUITODO: Convert to EuiCodeBlock
.tvbError__stack {
padding: $euiSizeS;
background: $euiCodeBlockBackgroundColor;
color: $euiCodeBlockColor;
line-height: $euiLineHeight;
font-family: $euiCodeFontFamily;
font-weight: $euiFontWeightRegular;
white-space: pre-wrap;
}

View file

@ -125,22 +125,22 @@ export function AddDeleteButtons(props) {
AddDeleteButtons.defaultProps = {
testSubj: 'Add',
activeTooltip: i18n.translate('tsvb.addDeleteButtons.addButtonDefaultTooltip', {
activeTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.addButtonDefaultTooltip', {
defaultMessage: 'Add',
}),
addTooltip: i18n.translate('tsvb.addDeleteButtons.addButtonDefaultTooltip', {
addTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.addButtonDefaultTooltip', {
defaultMessage: 'Add',
}),
deleteTooltip: i18n.translate('tsvb.addDeleteButtons.deleteButtonDefaultTooltip', {
deleteTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.deleteButtonDefaultTooltip', {
defaultMessage: 'Delete',
}),
cloneTooltip: i18n.translate('tsvb.addDeleteButtons.cloneButtonDefaultTooltip', {
cloneTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.cloneButtonDefaultTooltip', {
defaultMessage: 'Clone',
}),
activatePanelTooltip: i18n.translate('tsvb.addDeleteButtons.reEnableTooltip', {
activatePanelTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.reEnableTooltip', {
defaultMessage: 'Re-enable',
}),
deactivatePanelTooltip: i18n.translate('tsvb.addDeleteButtons.temporarilyDisableTooltip', {
deactivatePanelTooltip: i18n.translate('visTypeTimeseries.addDeleteButtons.temporarilyDisableTooltip', {
defaultMessage: 'Temporarily Disable',
}),
};

View file

@ -58,11 +58,11 @@ function AggRowUi(props) {
<AddDeleteButtons
testSubj="addMetric"
addTooltip={intl.formatMessage({
id: 'tsvb.aggRow.addMetricButtonTooltip',
id: 'visTypeTimeseries.aggRow.addMetricButtonTooltip',
defaultMessage: 'Add Metric',
})}
deleteTooltip={intl.formatMessage({
id: 'tsvb.aggRow.deleteMetricButtonTooltip',
id: 'visTypeTimeseries.aggRow.deleteMetricButtonTooltip',
defaultMessage: 'Delete Metric',
})}
onAdd={props.onAdd}

View file

@ -26,79 +26,79 @@ import { isMetricEnabled } from '../../lib/check_ui_restrictions';
const metricAggs = [
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.averageLabel', { defaultMessage: 'Average' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.averageLabel', { defaultMessage: 'Average' }),
value: 'avg',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.cardinalityLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.cardinalityLabel', {
defaultMessage: 'Cardinality',
}),
value: 'cardinality',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.countLabel', { defaultMessage: 'Count' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.countLabel', { defaultMessage: 'Count' }),
value: 'count',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.filterRatioLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.filterRatioLabel', {
defaultMessage: 'Filter Ratio',
}),
value: 'filter_ratio',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.maxLabel', { defaultMessage: 'Max' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.maxLabel', { defaultMessage: 'Max' }),
value: 'max',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.minLabel', { defaultMessage: 'Min' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.minLabel', { defaultMessage: 'Min' }),
value: 'min',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.percentileLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.percentileLabel', {
defaultMessage: 'Percentile',
}),
value: 'percentile',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.percentileRankLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.percentileRankLabel', {
defaultMessage: 'Percentile Rank',
}),
value: 'percentile_rank',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.staticValueLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.staticValueLabel', {
defaultMessage: 'Static Value',
}),
value: 'static',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.stdDeviationLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.stdDeviationLabel', {
defaultMessage: 'Std. Deviation',
}),
value: 'std_deviation',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.sumLabel', { defaultMessage: 'Sum' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.sumLabel', { defaultMessage: 'Sum' }),
value: 'sum',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.sumOfSquaresLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.sumOfSquaresLabel', {
defaultMessage: 'Sum of Squares',
}),
value: 'sum_of_squares',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.topHitLabel', { defaultMessage: 'Top Hit' }),
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.topHitLabel', { defaultMessage: 'Top Hit' }),
value: 'top_hit',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.valueCountLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.valueCountLabel', {
defaultMessage: 'Value Count',
}),
value: 'value_count',
},
{
label: i18n.translate('tsvb.aggSelect.metricsAggs.varianceLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.metricsAggs.varianceLabel', {
defaultMessage: 'Variance',
}),
value: 'variance',
@ -107,37 +107,37 @@ const metricAggs = [
const pipelineAggs = [
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.bucketScriptLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.bucketScriptLabel', {
defaultMessage: 'Bucket Script',
}),
value: 'calculation',
},
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.cumulativeSumLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.cumulativeSumLabel', {
defaultMessage: 'Cumulative Sum',
}),
value: 'cumulative_sum',
},
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.derivativeLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.derivativeLabel', {
defaultMessage: 'Derivative',
}),
value: 'derivative',
},
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.movingAverageLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.movingAverageLabel', {
defaultMessage: 'Moving Average',
}),
value: 'moving_average',
},
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.positiveOnlyLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.positiveOnlyLabel', {
defaultMessage: 'Positive Only',
}),
value: 'positive_only',
},
{
label: i18n.translate('tsvb.aggSelect.pipelineAggs.serialDifferenceLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.pipelineAggs.serialDifferenceLabel', {
defaultMessage: 'Serial Difference',
}),
value: 'serial_diff',
@ -146,43 +146,43 @@ const pipelineAggs = [
const siblingAggs = [
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallAverageLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallAverageLabel', {
defaultMessage: 'Overall Average',
}),
value: 'avg_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallMaxLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallMaxLabel', {
defaultMessage: 'Overall Max',
}),
value: 'max_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallMinLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallMinLabel', {
defaultMessage: 'Overall Min',
}),
value: 'min_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallStdDeviationLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallStdDeviationLabel', {
defaultMessage: 'Overall Std. Deviation',
}),
value: 'std_deviation_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallSumLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallSumLabel', {
defaultMessage: 'Overall Sum',
}),
value: 'sum_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallSumOfSquaresLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallSumOfSquaresLabel', {
defaultMessage: 'Overall Sum of Squares',
}),
value: 'sum_of_squares_bucket',
},
{
label: i18n.translate('tsvb.aggSelect.siblingAggs.overallVarianceLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.siblingAggs.overallVarianceLabel', {
defaultMessage: 'Overall Variance',
}),
value: 'variance_bucket',
@ -191,13 +191,13 @@ const siblingAggs = [
const specialAggs = [
{
label: i18n.translate('tsvb.aggSelect.specialAggs.seriesAggLabel', {
label: i18n.translate('visTypeTimeseries.aggSelect.specialAggs.seriesAggLabel', {
defaultMessage: 'Series Agg',
}),
value: 'series_agg',
},
{
label: i18n.translate('tsvb.aggSelect.specialAggs.mathLabel', { defaultMessage: 'Math' }),
label: i18n.translate('visTypeTimeseries.aggSelect.specialAggs.mathLabel', { defaultMessage: 'Math' }),
value: 'math',
},
];
@ -234,7 +234,7 @@ function AggSelectUi(props) {
options = [
{
label: intl.formatMessage({
id: 'tsvb.aggSelect.aggGroups.metricAggLabel',
id: 'visTypeTimeseries.aggSelect.aggGroups.metricAggLabel',
defaultMessage: 'Metric Aggregations',
}),
options: metricAggs.map(agg => ({
@ -244,21 +244,21 @@ function AggSelectUi(props) {
},
{
label: intl.formatMessage({
id: 'tsvb.aggSelect.aggGroups.parentPipelineAggLabel',
id: 'visTypeTimeseries.aggSelect.aggGroups.parentPipelineAggLabel',
defaultMessage: 'Parent Pipeline Aggregations',
}),
options: pipelineAggs.filter(filterByPanelType(panelType)).map(disableSiblingAggs),
},
{
label: intl.formatMessage({
id: 'tsvb.aggSelect.aggGroups.siblingPipelineAggLabel',
id: 'visTypeTimeseries.aggSelect.aggGroups.siblingPipelineAggLabel',
defaultMessage: 'Sibling Pipeline Aggregations',
}),
options: siblingAggs.map(disableSiblingAggs),
},
{
label: intl.formatMessage({
id: 'tsvb.aggSelect.aggGroups.specialAggLabel',
id: 'visTypeTimeseries.aggSelect.aggGroups.specialAggLabel',
defaultMessage: 'Special Aggregations',
}),
options: specialAggs.map(disableSiblingAggs),
@ -276,7 +276,7 @@ function AggSelectUi(props) {
<EuiComboBox
isClearable={false}
placeholder={intl.formatMessage({
id: 'tsvb.aggSelect.selectAggPlaceholder',
id: 'visTypeTimeseries.aggSelect.selectAggPlaceholder',
defaultMessage: 'Select aggregation',
})}
options={options}

View file

@ -76,7 +76,7 @@ export class CalculationAgg extends Component {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.calculation.aggregationLabel"
id="visTypeTimeseries.calculation.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -91,7 +91,7 @@ export class CalculationAgg extends Component {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('variables')}>
<FormattedMessage id="tsvb.calculation.variablesLabel" defaultMessage="Variables" />
<FormattedMessage id="visTypeTimeseries.calculation.variablesLabel" defaultMessage="Variables" />
</EuiFormLabel>
<CalculationVars
id={htmlId('variables')}
@ -107,7 +107,7 @@ export class CalculationAgg extends Component {
id={htmlId('painless')}
label={
<FormattedMessage
id="tsvb.calculation.painlessScriptLabel"
id="visTypeTimeseries.calculation.painlessScriptLabel"
defaultMessage="Painless Script"
/>
}
@ -115,7 +115,7 @@ export class CalculationAgg extends Component {
helpText={
<div>
<FormattedMessage
id="tsvb.calculation.painlessScriptDescription"
id="visTypeTimeseries.calculation.painlessScriptDescription"
defaultMessage="Variables are keys on the {params} object, i.e. {paramsName}. To access the bucket
interval (in milliseconds) use {paramsInterval}."
values={{

View file

@ -45,7 +45,7 @@ export function CumulativeSumAgg(props) {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.cumulativeSum.aggregationLabel"
id="visTypeTimeseries.cumulativeSum.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -60,7 +60,7 @@ export function CumulativeSumAgg(props) {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={<FormattedMessage id="tsvb.cumulativeSum.metricLabel" defaultMessage="Metric" />}
label={<FormattedMessage id="visTypeTimeseries.cumulativeSum.metricLabel" defaultMessage="Metric" />}
>
<MetricSelect
onChange={handleSelectChange('field')}

View file

@ -59,7 +59,7 @@ export const DerivativeAgg = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.derivative.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.derivative.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -73,7 +73,7 @@ export const DerivativeAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={<FormattedMessage id="tsvb.derivative.metricLabel" defaultMessage="Metric" />}
label={<FormattedMessage id="visTypeTimeseries.derivative.metricLabel" defaultMessage="Metric" />}
fullWidth
>
<MetricSelect
@ -90,7 +90,7 @@ export const DerivativeAgg = props => {
id={htmlId('units')}
label={
<FormattedMessage
id="tsvb.derivative.unitsLabel"
id="visTypeTimeseries.derivative.unitsLabel"
defaultMessage="Units (1s, 1m, etc)"
description="1s and 1m are required values and must not be translated."
/>

View file

@ -94,7 +94,7 @@ FieldSelectUi.defaultProps = {
indexPattern: '*',
disabled: false,
restrict: [],
placeholder: i18n.translate('tsvb.fieldSelect.selectFieldPlaceholder', {
placeholder: i18n.translate('visTypeTimeseries.fieldSelect.selectFieldPlaceholder', {
defaultMessage: 'Select field...',
}),
};

View file

@ -70,7 +70,7 @@ export const FilterRatioAgg = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.filterRatio.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.filterRatio.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -85,7 +85,7 @@ export const FilterRatioAgg = props => {
<EuiFormRow
id={htmlId('numerator')}
label={
<FormattedMessage id="tsvb.filterRatio.numeratorLabel" defaultMessage="Numerator" />
<FormattedMessage id="visTypeTimeseries.filterRatio.numeratorLabel" defaultMessage="Numerator" />
}
>
<EuiFieldText onChange={handleTextChange('numerator')} value={model.numerator} />
@ -97,7 +97,7 @@ export const FilterRatioAgg = props => {
id={htmlId('denominator')}
label={
<FormattedMessage
id="tsvb.filterRatio.denominatorLabel"
id="visTypeTimeseries.filterRatio.denominatorLabel"
defaultMessage="Denominator"
/>
}
@ -113,7 +113,7 @@ export const FilterRatioAgg = props => {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('metric')}>
<FormattedMessage
id="tsvb.filterRatio.metricAggregationLabel"
id="visTypeTimeseries.filterRatio.metricAggregationLabel"
defaultMessage="Metric Aggregation"
/>
</EuiFormLabel>
@ -130,7 +130,7 @@ export const FilterRatioAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('aggField')}
label={<FormattedMessage id="tsvb.filterRatio.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.filterRatio.fieldLabel" defaultMessage="Field" />}
>
<FieldSelect
fields={fields}

View file

@ -74,7 +74,7 @@ export class MathAgg extends Component {
<EuiFlexGroup direction="column" gutterSize="l">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.math.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.math.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -86,7 +86,7 @@ export class MathAgg extends Component {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('variables')}>
<FormattedMessage id="tsvb.math.variablesLabel" defaultMessage="Variables" />
<FormattedMessage id="visTypeTimeseries.math.variablesLabel" defaultMessage="Variables" />
</EuiFormLabel>
<CalculationVars
id={htmlId('variables')}
@ -102,12 +102,12 @@ export class MathAgg extends Component {
<EuiFormRow
id="mathExpressionInput"
label={
<FormattedMessage id="tsvb.math.expressionLabel" defaultMessage="Expression" />
<FormattedMessage id="visTypeTimeseries.math.expressionLabel" defaultMessage="Expression" />
}
fullWidth
helpText={
<FormattedMessage
id="tsvb.math.expressionDescription"
id="visTypeTimeseries.math.expressionDescription"
defaultMessage="This field uses basic math expressions (see {link}) - Variables are keys on the {params} object,
i.e. {paramsName} To access all the data use {paramsValues} for an array of the values and {paramsTimestamps} for
an array of the timestamps. {paramsTimestamp} is available for the current bucket's timestamp,
@ -120,7 +120,7 @@ export class MathAgg extends Component {
target="_blank"
>
<FormattedMessage
id="tsvb.math.expressionDescription.tinyMathLinkText"
id="visTypeTimeseries.math.expressionDescription.tinyMathLinkText"
defaultMessage="TinyMath"
/>
</EuiLink>

View file

@ -123,7 +123,7 @@ function MetricSelectUi(props) {
return (
<EuiComboBox
placeholder={intl.formatMessage({
id: 'tsvb.metricSelect.selectMetricPlaceholder',
id: 'visTypeTimeseries.metricSelect.selectMetricPlaceholder',
defaultMessage: 'Select metric…',
})}
options={allOptions}

View file

@ -57,31 +57,31 @@ export const MovingAverageAgg = props => {
const model = { ...DEFAULTS, ...props.model };
const modelOptions = [
{
label: i18n.translate('tsvb.movingAverage.modelOptions.simpleLabel', {
label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.simpleLabel', {
defaultMessage: 'Simple',
}),
value: MODEL_TYPES.UNWEIGHTED,
},
{
label: i18n.translate('tsvb.movingAverage.modelOptions.linearLabel', {
label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.linearLabel', {
defaultMessage: 'Linear',
}),
value: MODEL_TYPES.WEIGHTED_LINEAR,
},
{
label: i18n.translate('tsvb.movingAverage.modelOptions.exponentiallyWeightedLabel', {
label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.exponentiallyWeightedLabel', {
defaultMessage: 'Exponentially Weighted',
}),
value: MODEL_TYPES.WEIGHTED_EXPONENTIAL,
},
{
label: i18n.translate('tsvb.movingAverage.modelOptions.holtLinearLabel', {
label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.holtLinearLabel', {
defaultMessage: 'Holt-Linear',
}),
value: MODEL_TYPES.WEIGHTED_EXPONENTIAL_DOUBLE,
},
{
label: i18n.translate('tsvb.movingAverage.modelOptions.holtWintersLabel', {
label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.holtWintersLabel', {
defaultMessage: 'Holt-Winters',
}),
value: MODEL_TYPES.WEIGHTED_EXPONENTIAL_TRIPLE,
@ -97,13 +97,13 @@ export const MovingAverageAgg = props => {
const multiplicativeOptions = [
{
label: i18n.translate('tsvb.movingAverage.multiplicativeOptions.true', {
label: i18n.translate('visTypeTimeseries.movingAverage.multiplicativeOptions.true', {
defaultMessage: 'True',
}),
value: true,
},
{
label: i18n.translate('tsvb.movingAverage.multiplicativeOptions.false', {
label: i18n.translate('visTypeTimeseries.movingAverage.multiplicativeOptions.false', {
defaultMessage: 'False',
}),
value: false,
@ -125,7 +125,7 @@ export const MovingAverageAgg = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
{i18n.translate('tsvb.movingAverage.aggregationLabel', {
{i18n.translate('visTypeTimeseries.movingAverage.aggregationLabel', {
defaultMessage: 'Aggregation',
})}
</EuiFormLabel>
@ -140,7 +140,7 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={i18n.translate('tsvb.movingAverage.metricLabel', {
label={i18n.translate('visTypeTimeseries.movingAverage.metricLabel', {
defaultMessage: 'Metric',
})}
>
@ -160,13 +160,13 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('model_type')}
label={i18n.translate('tsvb.movingAverage.modelLabel', {
label={i18n.translate('visTypeTimeseries.movingAverage.modelLabel', {
defaultMessage: 'Model',
})}
>
<EuiComboBox
isClearable={false}
placeholder={i18n.translate('tsvb.movingAverage.model.selectPlaceholder', {
placeholder={i18n.translate('visTypeTimeseries.movingAverage.model.selectPlaceholder', {
defaultMessage: 'Select',
})}
options={modelOptions}
@ -179,12 +179,12 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('windowSize')}
label={i18n.translate('tsvb.movingAverage.windowSizeLabel', {
label={i18n.translate('visTypeTimeseries.movingAverage.windowSizeLabel', {
defaultMessage: 'Window Size',
})}
helpText={
shouldShowHint(model) &&
i18n.translate('tsvb.movingAverage.windowSizeHint', {
i18n.translate('visTypeTimeseries.movingAverage.windowSizeHint', {
defaultMessage: 'Window must always be at least twice the size of your period',
})
}
@ -214,7 +214,7 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('alpha')}
label={i18n.translate('tsvb.movingAverage.alpha', {
label={i18n.translate('visTypeTimeseries.movingAverage.alpha', {
defaultMessage: 'Alpha',
})}
>
@ -231,7 +231,7 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('beta')}
label={i18n.translate('tsvb.movingAverage.beta', {
label={i18n.translate('visTypeTimeseries.movingAverage.beta', {
defaultMessage: 'Beta',
})}
>
@ -248,7 +248,7 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('gamma')}
label={i18n.translate('tsvb.movingAverage.gamma', {
label={i18n.translate('visTypeTimeseries.movingAverage.gamma', {
defaultMessage: 'Gamma',
})}
>
@ -262,7 +262,7 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('period')}
label={i18n.translate('tsvb.movingAverage.period', {
label={i18n.translate('visTypeTimeseries.movingAverage.period', {
defaultMessage: 'Period',
})}
>
@ -276,13 +276,13 @@ export const MovingAverageAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('multiplicative')}
label={i18n.translate('tsvb.movingAverage.multiplicative', {
label={i18n.translate('visTypeTimeseries.movingAverage.multiplicative', {
defaultMessage: 'Multiplicative',
})}
>
<EuiComboBox
placeholder={i18n.translate(
'tsvb.movingAverage.multiplicative.selectPlaceholder',
'visTypeTimeseries.movingAverage.multiplicative.selectPlaceholder',
{
defaultMessage: 'Select',
}

View file

@ -74,7 +74,7 @@ export class PercentileAgg extends Component {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.percentile.aggregationLabel"
id="visTypeTimeseries.percentile.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -89,7 +89,7 @@ export class PercentileAgg extends Component {
<EuiFlexItem>
<EuiFormRow
id={htmlId('field')}
label={<FormattedMessage id="tsvb.percentile.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.percentile.fieldLabel" defaultMessage="Field" />}
>
<FieldSelect
fields={fields}

View file

@ -45,7 +45,7 @@ export const MultiValueRow = ({ model, onChange, onDelete, onAdd, disableAdd, di
<EuiFlexGroup responsive={false} alignItems="center">
<EuiFlexItem grow={false}>
<EuiFormLabel htmlFor={htmlId('value')}>
<FormattedMessage id="tsvb.multivalueRow.valueLabel" defaultMessage="Value:" />
<FormattedMessage id="visTypeTimeseries.multivalueRow.valueLabel" defaultMessage="Value:" />
</EuiFormLabel>
</EuiFlexItem>
<EuiFlexItem grow={false}>

View file

@ -73,7 +73,7 @@ export const PercentileRankAgg = props => {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.percentileRank.aggregationLabel"
id="visTypeTimeseries.percentileRank.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -88,7 +88,7 @@ export const PercentileRankAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('field')}
label={<FormattedMessage id="tsvb.percentileRank.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.percentileRank.fieldLabel" defaultMessage="Field" />}
>
<FieldSelect
fields={fields}

View file

@ -56,7 +56,7 @@ class PercentilesUi extends Component {
<EuiFlexItem grow={false}>
<EuiFieldNumber
aria-label={intl.formatMessage({
id: 'tsvb.percentile.percentileAriaLabel',
id: 'visTypeTimeseries.percentile.percentileAriaLabel',
defaultMessage: 'Percentile',
})}
placeholder={0}
@ -78,14 +78,14 @@ class PercentilesUi extends Component {
const modeOptions = [
{
label: intl.formatMessage({
id: 'tsvb.percentile.modeOptions.lineLabel',
id: 'visTypeTimeseries.percentile.modeOptions.lineLabel',
defaultMessage: 'Line',
}),
value: 'line',
},
{
label: intl.formatMessage({
id: 'tsvb.percentile.modeOptions.bandLabel',
id: 'visTypeTimeseries.percentile.modeOptions.bandLabel',
defaultMessage: 'Band',
}),
value: 'band',
@ -107,7 +107,7 @@ class PercentilesUi extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel style={labelStyle} htmlFor={htmlId('mode')}>
<FormattedMessage id="tsvb.percentile.modeLabel" defaultMessage="Mode:" />
<FormattedMessage id="visTypeTimeseries.percentile.modeLabel" defaultMessage="Mode:" />
</EuiFormLabel>
</EuiFlexItem>
<EuiFlexItem grow={false}>
@ -123,7 +123,7 @@ class PercentilesUi extends Component {
<EuiFlexItem style={optionsStyle} grow={false}>
<EuiFormLabel style={labelStyle} htmlFor={htmlId('fillTo')}>
<FormattedMessage id="tsvb.percentile.fillToLabel" defaultMessage="Fill to:" />
<FormattedMessage id="visTypeTimeseries.percentile.fillToLabel" defaultMessage="Fill to:" />
</EuiFormLabel>
</EuiFlexItem>
<EuiFlexItem style={optionsStyle} grow={false}>
@ -137,7 +137,7 @@ class PercentilesUi extends Component {
<EuiFlexItem style={optionsStyle} grow={false}>
<EuiFormLabel style={labelStyle} htmlFor={htmlId('shade')}>
<FormattedMessage id="tsvb.percentile.shadeLabel" defaultMessage="Shade (0 to 1):" />
<FormattedMessage id="visTypeTimeseries.percentile.shadeLabel" defaultMessage="Shade (0 to 1):" />
</EuiFormLabel>
</EuiFlexItem>
<EuiFlexItem style={optionsStyle} grow={false}>

View file

@ -50,7 +50,7 @@ export const PositiveOnlyAgg = props => {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.positiveOnly.aggregationLabel"
id="visTypeTimeseries.positiveOnly.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -65,7 +65,7 @@ export const PositiveOnlyAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={<FormattedMessage id="tsvb.positiveOnly.metricLabel" defaultMessage="Metric" />}
label={<FormattedMessage id="visTypeTimeseries.positiveOnly.metricLabel" defaultMessage="Metric" />}
>
<MetricSelect
onChange={handleSelectChange('field')}

View file

@ -51,7 +51,7 @@ export const SerialDiffAgg = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.serialDiff.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.serialDiff.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -64,7 +64,7 @@ export const SerialDiffAgg = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={<FormattedMessage id="tsvb.serialDiff.metricLabel" defaultMessage="Metric" />}
label={<FormattedMessage id="visTypeTimeseries.serialDiff.metricLabel" defaultMessage="Metric" />}
>
<MetricSelect
onChange={handleSelectChange('field')}
@ -79,7 +79,7 @@ export const SerialDiffAgg = props => {
id={htmlId('lag')}
label={
<FormattedMessage
id="tsvb.serialDiff.lagLabel"
id="visTypeTimeseries.serialDiff.lagLabel"
defaultMessage="Lag"
description="'Lag' refers to the parameter name of the serial diff translation
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-serialdiff-aggregation.html.

View file

@ -45,63 +45,63 @@ function SeriesAggUi(props) {
const functionOptions = [
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.sumLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.sumLabel',
defaultMessage: 'Sum',
}),
value: 'sum',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.maxLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.maxLabel',
defaultMessage: 'Max',
}),
value: 'max',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.minLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.minLabel',
defaultMessage: 'Min',
}),
value: 'min',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.avgLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.avgLabel',
defaultMessage: 'Avg',
}),
value: 'mean',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.overallSumLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.overallSumLabel',
defaultMessage: 'Overall Sum',
}),
value: 'overall_sum',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.overallMaxLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.overallMaxLabel',
defaultMessage: 'Overall Max',
}),
value: 'overall_max',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.overallMinLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.overallMinLabel',
defaultMessage: 'Overall Min',
}),
value: 'overall_min',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.overallAvgLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.overallAvgLabel',
defaultMessage: 'Overall Avg',
}),
value: 'overall_avg',
},
{
label: intl.formatMessage({
id: 'tsvb.seriesAgg.functionOptions.cumulativeSumLabel',
id: 'visTypeTimeseries.seriesAgg.functionOptions.cumulativeSumLabel',
defaultMessage: 'Cumulative Sum',
}),
value: 'cumulative_sum',
@ -124,7 +124,7 @@ function SeriesAggUi(props) {
<EuiTitle className="tvbAggRow__unavailable" size="xxxs">
<span>
<FormattedMessage
id="tsvb.seriesAgg.seriesAggIsNotCompatibleLabel"
id="visTypeTimeseries.seriesAgg.seriesAggIsNotCompatibleLabel"
defaultMessage="Series Agg is not compatible with the table visualization."
/>
</span>
@ -145,7 +145,7 @@ function SeriesAggUi(props) {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.seriesAgg.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.seriesAgg.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -158,7 +158,7 @@ function SeriesAggUi(props) {
<EuiFlexItem>
<EuiFormRow
id={htmlId('function')}
label={<FormattedMessage id="tsvb.seriesAgg.functionLabel" defaultMessage="Function" />}
label={<FormattedMessage id="visTypeTimeseries.seriesAgg.functionLabel" defaultMessage="Function" />}
>
<EuiComboBox
options={functionOptions}

View file

@ -61,7 +61,7 @@ export const Static = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.static.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.static.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -75,7 +75,7 @@ export const Static = props => {
<EuiFormRow
id={htmlId('staticValue')}
label={
<FormattedMessage id="tsvb.static.staticValuesLabel" defaultMessage="Static Value" />
<FormattedMessage id="visTypeTimeseries.static.staticValuesLabel" defaultMessage="Static Value" />
}
>
<EuiFieldNumber

View file

@ -51,7 +51,7 @@ export function StandardAgg(props) {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.stdAgg.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.stdAgg.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -68,7 +68,7 @@ export function StandardAgg(props) {
<EuiFlexItem>
<EuiFormRow
id={htmlId('field')}
label={<FormattedMessage id="tsvb.stdAgg.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.stdAgg.fieldLabel" defaultMessage="Field" />}
fullWidth
>
<FieldSelect

View file

@ -47,21 +47,21 @@ const StandardDeviationAggUi = props => {
const modeOptions = [
{
label: intl.formatMessage({
id: 'tsvb.stdDeviation.modeOptions.rawLabel',
id: 'visTypeTimeseries.stdDeviation.modeOptions.rawLabel',
defaultMessage: 'Raw',
}),
value: 'raw',
},
{
label: intl.formatMessage({
id: 'tsvb.stdDeviation.modeOptions.upperBoundLabel',
id: 'visTypeTimeseries.stdDeviation.modeOptions.upperBoundLabel',
defaultMessage: 'Upper Bound',
}),
value: 'upper',
},
{
label: intl.formatMessage({
id: 'tsvb.stdDeviation.modeOptions.lowerBoundLabel',
id: 'visTypeTimeseries.stdDeviation.modeOptions.lowerBoundLabel',
defaultMessage: 'Lower Bound',
}),
value: 'lower',
@ -71,7 +71,7 @@ const StandardDeviationAggUi = props => {
if (panel.type !== 'table') {
modeOptions.push({
label: intl.formatMessage({
id: 'tsvb.stdDeviation.modeOptions.boundsBandLabel',
id: 'visTypeTimeseries.stdDeviation.modeOptions.boundsBandLabel',
defaultMessage: 'Bounds Band',
}),
value: 'band',
@ -102,7 +102,7 @@ const StandardDeviationAggUi = props => {
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage
id="tsvb.stdDeviation.aggregationLabel"
id="visTypeTimeseries.stdDeviation.aggregationLabel"
defaultMessage="Aggregation"
/>
</EuiFormLabel>
@ -117,7 +117,7 @@ const StandardDeviationAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('field')}
label={<FormattedMessage id="tsvb.stdDeviation.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.stdDeviation.fieldLabel" defaultMessage="Field" />}
>
<FieldSelect
fields={fields}
@ -132,7 +132,7 @@ const StandardDeviationAggUi = props => {
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('sigma')}
label={<FormattedMessage id="tsvb.stdDeviation.sigmaLabel" defaultMessage="Sigma" />}
label={<FormattedMessage id="visTypeTimeseries.stdDeviation.sigmaLabel" defaultMessage="Sigma" />}
>
<EuiFieldText value={model.sigma} onChange={handleTextChange('sigma')} />
</EuiFormRow>
@ -140,7 +140,7 @@ const StandardDeviationAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('mode')}
label={<FormattedMessage id="tsvb.stdDeviation.modeLabel" defaultMessage="Mode" />}
label={<FormattedMessage id="visTypeTimeseries.stdDeviation.modeLabel" defaultMessage="Mode" />}
>
<EuiComboBox
options={modeOptions}

View file

@ -52,7 +52,7 @@ const StandardSiblingAggUi = props => {
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('sigma')}
label={<FormattedMessage id="tsvb.stdSibling.sigmaLabel" defaultMessage="Sigma" />}
label={<FormattedMessage id="visTypeTimeseries.stdSibling.sigmaLabel" defaultMessage="Sigma" />}
>
<EuiFieldText value={model.sigma} onChange={handleTextChange('sigma')} />
</EuiFormRow>
@ -62,28 +62,28 @@ const StandardSiblingAggUi = props => {
const modeOptions = [
{
label: intl.formatMessage({
id: 'tsvb.stdSibling.modeOptions.rawLabel',
id: 'visTypeTimeseries.stdSibling.modeOptions.rawLabel',
defaultMessage: 'Raw',
}),
value: 'raw',
},
{
label: intl.formatMessage({
id: 'tsvb.stdSibling.modeOptions.upperBoundLabel',
id: 'visTypeTimeseries.stdSibling.modeOptions.upperBoundLabel',
defaultMessage: 'Upper Bound',
}),
value: 'upper',
},
{
label: intl.formatMessage({
id: 'tsvb.stdSibling.modeOptions.lowerBoundLabel',
id: 'visTypeTimeseries.stdSibling.modeOptions.lowerBoundLabel',
defaultMessage: 'Lower Bound',
}),
value: 'lower',
},
{
label: intl.formatMessage({
id: 'tsvb.stdSibling.modeOptions.boundsBandLabel',
id: 'visTypeTimeseries.stdSibling.modeOptions.boundsBandLabel',
defaultMessage: 'Bounds Band',
}),
value: 'band',
@ -97,7 +97,7 @@ const StandardSiblingAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('mode')}
label={<FormattedMessage id="tsvb.stdSibling.modeLabel" defaultMessage="Mode" />}
label={<FormattedMessage id="visTypeTimeseries.stdSibling.modeLabel" defaultMessage="Mode" />}
>
<EuiComboBox
options={modeOptions}
@ -122,7 +122,7 @@ const StandardSiblingAggUi = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.stdSibling.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.stdSibling.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -136,7 +136,7 @@ const StandardSiblingAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('metric')}
label={<FormattedMessage id="tsvb.stdSibling.metricLabel" defaultMessage="Metric" />}
label={<FormattedMessage id="visTypeTimeseries.stdSibling.metricLabel" defaultMessage="Metric" />}
>
<MetricSelect
onChange={handleSelectChange('field')}

View file

@ -35,7 +35,7 @@ export function TemporaryUnsupportedAgg(props) {
<EuiTitle className="tvbAggRow__unavailable" size="xxxs">
<span>
<FormattedMessage
id="tsvb.unsupportedAgg.aggIsTemporaryUnsupportedDescription"
id="visTypeTimeseries.unsupportedAgg.aggIsTemporaryUnsupportedDescription"
defaultMessage="The {modelType} aggregation is currently unsupported."
values={{ modelType: <EuiCode>{props.model.type}</EuiCode> }}
/>

View file

@ -47,25 +47,25 @@ const getAggWithOptions = (field = {}, fieldTypesRestriction) => {
case ES_TYPES.NUMBER:
return [
{
label: i18n.translate('tsvb.topHit.aggWithOptions.averageLabel', {
label: i18n.translate('visTypeTimeseries.topHit.aggWithOptions.averageLabel', {
defaultMessage: 'Avg',
}),
value: 'avg',
},
{
label: i18n.translate('tsvb.topHit.aggWithOptions.maxLabel', {
label: i18n.translate('visTypeTimeseries.topHit.aggWithOptions.maxLabel', {
defaultMessage: 'Max',
}),
value: 'max',
},
{
label: i18n.translate('tsvb.topHit.aggWithOptions.minLabel', {
label: i18n.translate('visTypeTimeseries.topHit.aggWithOptions.minLabel', {
defaultMessage: 'Min',
}),
value: 'min',
},
{
label: i18n.translate('tsvb.topHit.aggWithOptions.sumLabel', {
label: i18n.translate('visTypeTimeseries.topHit.aggWithOptions.sumLabel', {
defaultMessage: 'Sum',
}),
value: 'sum',
@ -75,7 +75,7 @@ const getAggWithOptions = (field = {}, fieldTypesRestriction) => {
case ES_TYPES.STRING:
return [
{
label: i18n.translate('tsvb.topHit.aggWithOptions.concatenate', {
label: i18n.translate('visTypeTimeseries.topHit.aggWithOptions.concatenate', {
defaultMessage: 'Concatenate',
}),
value: 'concat',
@ -89,13 +89,13 @@ const getAggWithOptions = (field = {}, fieldTypesRestriction) => {
const getOrderOptions = () => [
{
label: i18n.translate('tsvb.topHit.orderOptions.ascLabel', {
label: i18n.translate('visTypeTimeseries.topHit.orderOptions.ascLabel', {
defaultMessage: 'Asc',
}),
value: 'asc',
},
{
label: i18n.translate('tsvb.topHit.orderOptions.descLabel', {
label: i18n.translate('visTypeTimeseries.topHit.orderOptions.descLabel', {
defaultMessage: 'Desc',
}),
value: 'desc',
@ -153,7 +153,7 @@ const TopHitAggUi = props => {
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormLabel htmlFor={htmlId('aggregation')}>
<FormattedMessage id="tsvb.topHit.aggregationLabel" defaultMessage="Aggregation" />
<FormattedMessage id="visTypeTimeseries.topHit.aggregationLabel" defaultMessage="Aggregation" />
</EuiFormLabel>
<AggSelect
id={htmlId('aggregation')}
@ -166,7 +166,7 @@ const TopHitAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('field')}
label={<FormattedMessage id="tsvb.topHit.fieldLabel" defaultMessage="Field" />}
label={<FormattedMessage id="visTypeTimeseries.topHit.fieldLabel" defaultMessage="Field" />}
>
<FieldSelect
fields={fields}
@ -186,7 +186,7 @@ const TopHitAggUi = props => {
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('size')}
label={<FormattedMessage id="tsvb.topHit.sizeLabel" defaultMessage="Size" />}
label={<FormattedMessage id="visTypeTimeseries.topHit.sizeLabel" defaultMessage="Size" />}
>
{/*
EUITODO: The following input couldn't be converted to EUI because of type mis-match.
@ -204,14 +204,14 @@ const TopHitAggUi = props => {
id={htmlId('agg_with')}
label={
<FormattedMessage
id="tsvb.topHit.aggregateWithLabel"
id="visTypeTimeseries.topHit.aggregateWithLabel"
defaultMessage="Aggregate with"
/>
}
>
<EuiComboBox
isClearable={false}
placeholder={i18n.translate('tsvb.topHit.aggregateWith.selectPlaceholder', {
placeholder={i18n.translate('visTypeTimeseries.topHit.aggregateWith.selectPlaceholder', {
defaultMessage: 'Select...',
})}
options={aggWithOptions}
@ -224,7 +224,7 @@ const TopHitAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('order_by')}
label={<FormattedMessage id="tsvb.topHit.orderByLabel" defaultMessage="Order by" />}
label={<FormattedMessage id="visTypeTimeseries.topHit.orderByLabel" defaultMessage="Order by" />}
>
<FieldSelect
restrict={ORDER_DATE_RESTRICT_FIELDS}
@ -238,11 +238,11 @@ const TopHitAggUi = props => {
<EuiFlexItem>
<EuiFormRow
id={htmlId('order')}
label={<FormattedMessage id="tsvb.topHit.orderLabel" defaultMessage="Order" />}
label={<FormattedMessage id="visTypeTimeseries.topHit.orderLabel" defaultMessage="Order" />}
>
<EuiComboBox
isClearable={false}
placeholder={i18n.translate('tsvb.topHit.order.selectPlaceholder', {
placeholder={i18n.translate('visTypeTimeseries.topHit.order.selectPlaceholder', {
defaultMessage: 'Select...',
})}
options={orderOptions}

View file

@ -35,7 +35,7 @@ export function UnsupportedAgg(props) {
<EuiTitle className="tvbAggRow__unavailable" size="xxxs">
<span>
<FormattedMessage
id="tsvb.unsupportedAgg.aggIsNotSupportedDescription"
id="visTypeTimeseries.unsupportedAgg.aggIsNotSupportedDescription"
defaultMessage="The {modelType} aggregation is no longer supported."
values={{ modelType: <EuiCode>{props.model.type}</EuiCode> }}
/>

View file

@ -52,11 +52,11 @@ class CalculationVarsUi extends Component {
<EuiFieldText
className="tvbAggs__varName"
aria-label={intl.formatMessage({
id: 'tsvb.vars.variableNameAriaLabel',
id: 'visTypeTimeseries.vars.variableNameAriaLabel',
defaultMessage: 'Variable name',
})}
placeholder={intl.formatMessage({
id: 'tsvb.vars.variableNamePlaceholder',
id: 'visTypeTimeseries.vars.variableNamePlaceholder',
defaultMessage: 'Variable name',
})}
onChange={this.handleChange(row, 'name')}

View file

@ -119,7 +119,7 @@ export class AnnotationsEditor extends Component {
id={htmlId('indexPattern')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.indexPatternLabel"
id="visTypeTimeseries.annotationsEditor.indexPatternLabel"
defaultMessage="Index pattern (required)"
/>
}
@ -137,7 +137,7 @@ export class AnnotationsEditor extends Component {
id={htmlId('timeField')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.timeFieldLabel"
id="visTypeTimeseries.annotationsEditor.timeFieldLabel"
defaultMessage="Time field (required)"
/>
}
@ -163,7 +163,7 @@ export class AnnotationsEditor extends Component {
id={htmlId('queryString')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.queryStringLabel"
id="visTypeTimeseries.annotationsEditor.queryStringLabel"
defaultMessage="Query string"
/>
}
@ -182,7 +182,7 @@ export class AnnotationsEditor extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel>
<FormattedMessage
id="tsvb.annotationsEditor.ignoreGlobalFiltersLabel"
id="visTypeTimeseries.annotationsEditor.ignoreGlobalFiltersLabel"
defaultMessage="Ignore global filters?"
/>
</EuiFormLabel>
@ -196,7 +196,7 @@ export class AnnotationsEditor extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel>
<FormattedMessage
id="tsvb.annotationsEditor.ignorePanelFiltersLabel"
id="visTypeTimeseries.annotationsEditor.ignorePanelFiltersLabel"
defaultMessage="Ignore panel filters?"
/>
</EuiFormLabel>
@ -217,7 +217,7 @@ export class AnnotationsEditor extends Component {
id={htmlId('icon')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.iconLabel"
id="visTypeTimeseries.annotationsEditor.iconLabel"
defaultMessage="Icon (required)"
/>
}
@ -230,7 +230,7 @@ export class AnnotationsEditor extends Component {
id={htmlId('fields')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.fieldsLabel"
id="visTypeTimeseries.annotationsEditor.fieldsLabel"
defaultMessage="Fields (required - comma separated paths)"
/>
}
@ -248,14 +248,14 @@ export class AnnotationsEditor extends Component {
id={htmlId('rowTemplate')}
label={
<FormattedMessage
id="tsvb.annotationsEditor.rowTemplateLabel"
id="visTypeTimeseries.annotationsEditor.rowTemplateLabel"
defaultMessage="Row template (required)"
/>
}
helpText={
<span>
<FormattedMessage
id="tsvb.annotationsEditor.rowTemplateHelpText"
id="visTypeTimeseries.annotationsEditor.rowTemplateHelpText"
defaultMessage="eg.{rowTemplateExample}"
values={{ rowTemplateExample: <EuiCode>{'{{field}}'}</EuiCode> }}
/>
@ -295,13 +295,13 @@ export class AnnotationsEditor extends Component {
<EuiText textAlign="center">
<p>
<FormattedMessage
id="tsvb.annotationsEditor.howToCreateAnnotationDataSourceDescription"
id="visTypeTimeseries.annotationsEditor.howToCreateAnnotationDataSourceDescription"
defaultMessage="Click the button below to create an annotation data source."
/>
</p>
<EuiButton fill onClick={handleAdd}>
<FormattedMessage
id="tsvb.annotationsEditor.addDataSourceButtonLabel"
id="visTypeTimeseries.annotationsEditor.addDataSourceButtonLabel"
defaultMessage="Add data source"
/>
</EuiButton>
@ -314,7 +314,7 @@ export class AnnotationsEditor extends Component {
<EuiTitle size="s">
<span>
<FormattedMessage
id="tsvb.annotationsEditor.dataSourcesLabel"
id="visTypeTimeseries.annotationsEditor.dataSourcesLabel"
defaultMessage="Data sources"
/>
</span>

View file

@ -60,7 +60,7 @@ export class ColorPicker extends Component {
if (!this.props.value) {
return (
<button
aria-label={i18n.translate('tsvb.colorPicker.notAccessibleAriaLabel', {
aria-label={i18n.translate('visTypeTimeseries.colorPicker.notAccessibleAriaLabel', {
defaultMessage: 'Color picker, not accessible',
})}
className="tvbColorPicker__swatch-empty"
@ -70,7 +70,7 @@ export class ColorPicker extends Component {
}
return (
<button
aria-label={i18n.translate('tsvb.colorPicker.notAccessibleWithValueAriaLabel', {
aria-label={i18n.translate('visTypeTimeseries.colorPicker.notAccessibleWithValueAriaLabel', {
defaultMessage: 'Color picker ({value}), not accessible',
values: { value: this.props.value },
})}
@ -92,7 +92,7 @@ export class ColorPicker extends Component {
size="s"
type="cross"
color="danger"
content={i18n.translate('tsvb.colorPicker.clearIconLabel', {
content={i18n.translate('visTypeTimeseries.colorPicker.clearIconLabel', {
defaultMessage: 'Clear',
})}
/>

View file

@ -60,28 +60,28 @@ class ColorRulesUI extends Component {
const operatorOptions = [
{
label: intl.formatMessage({
id: 'tsvb.colorRules.greaterThanLabel',
id: 'visTypeTimeseries.colorRules.greaterThanLabel',
defaultMessage: '> greater than',
}),
value: 'gt',
},
{
label: intl.formatMessage({
id: 'tsvb.colorRules.greaterThanOrEqualLabel',
id: 'visTypeTimeseries.colorRules.greaterThanOrEqualLabel',
defaultMessage: '>= greater than or equal',
}),
value: 'gte',
},
{
label: intl.formatMessage({
id: 'tsvb.colorRules.lessThanLabel',
id: 'visTypeTimeseries.colorRules.lessThanLabel',
defaultMessage: '< less than',
}),
value: 'lt',
},
{
label: intl.formatMessage({
id: 'tsvb.colorRules.lessThanOrEqualLabel',
id: 'visTypeTimeseries.colorRules.lessThanOrEqualLabel',
defaultMessage: '<= less than or equal',
}),
value: 'lte',
@ -105,7 +105,7 @@ class ColorRulesUI extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel style={labelStyle}>
<FormattedMessage
id="tsvb.colorRules.setSecondaryColorLabel"
id="visTypeTimeseries.colorRules.setSecondaryColorLabel"
defaultMessage="and {secondaryName} to"
values={{ secondaryName: this.props.secondaryName }}
description="Part of a larger string: Set {primaryName} to {color} and {secondaryName} to {color} if
@ -135,7 +135,7 @@ class ColorRulesUI extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel style={labelStyle}>
<FormattedMessage
id="tsvb.colorRules.setPrimaryColorLabel"
id="visTypeTimeseries.colorRules.setPrimaryColorLabel"
defaultMessage="Set {primaryName} to"
values={{ primaryName: this.props.primaryName }}
description="Part of a larger string: Set {primaryName} to {color} and {secondaryName} to {color} if
@ -156,7 +156,7 @@ class ColorRulesUI extends Component {
<EuiFlexItem grow={false}>
<EuiFormLabel style={labelStyle} htmlFor={htmlId('ifMetricIs')}>
<FormattedMessage
id="tsvb.colorRules.ifMetricIsLabel"
id="visTypeTimeseries.colorRules.ifMetricIsLabel"
defaultMessage="if metric is"
description="Part of a larger string: Set {primaryName} to {color} and {secondaryName} to {color} if
metric is {greaterOrLessThan} {value}."
@ -177,7 +177,7 @@ class ColorRulesUI extends Component {
<EuiFlexItem>
<EuiFieldNumber
aria-label={intl.formatMessage({
id: 'tsvb.colorRules.valueAriaLabel',
id: 'visTypeTimeseries.colorRules.valueAriaLabel',
defaultMessage: 'Value',
})}
value={model.value}
@ -208,11 +208,11 @@ class ColorRulesUI extends Component {
ColorRulesUI.defaultProps = {
name: 'color_rules',
primaryName: i18n.translate('tsvb.colorRules.defaultPrimaryNameLabel', {
primaryName: i18n.translate('visTypeTimeseries.colorRules.defaultPrimaryNameLabel', {
defaultMessage: 'background',
}),
primaryVarName: 'background_color',
secondaryName: i18n.translate('tsvb.colorRules.defaultSecondaryNameLabel', {
secondaryName: i18n.translate('visTypeTimeseries.colorRules.defaultSecondaryNameLabel', {
defaultMessage: 'text',
}),
secondaryVarName: 'color',

View file

@ -120,35 +120,35 @@ class DataFormatPickerUI extends Component {
const options = [
{
label: intl.formatMessage({
id: 'tsvb.dataFormatPicker.bytesLabel',
id: 'visTypeTimeseries.dataFormatPicker.bytesLabel',
defaultMessage: 'Bytes',
}),
value: 'bytes',
},
{
label: intl.formatMessage({
id: 'tsvb.dataFormatPicker.numberLabel',
id: 'visTypeTimeseries.dataFormatPicker.numberLabel',
defaultMessage: 'Number',
}),
value: 'number',
},
{
label: intl.formatMessage({
id: 'tsvb.dataFormatPicker.percentLabel',
id: 'visTypeTimeseries.dataFormatPicker.percentLabel',
defaultMessage: 'Percent',
}),
value: 'percent',
},
{
label: intl.formatMessage({
id: 'tsvb.dataFormatPicker.durationLabel',
id: 'visTypeTimeseries.dataFormatPicker.durationLabel',
defaultMessage: 'Duration',
}),
value: 'duration',
},
{
label: intl.formatMessage({
id: 'tsvb.dataFormatPicker.customLabel',
id: 'visTypeTimeseries.dataFormatPicker.customLabel',
defaultMessage: 'Custom',
}),
value: 'custom',
@ -181,7 +181,7 @@ class DataFormatPickerUI extends Component {
<EuiFormRow
id={htmlId('from')}
label={
<FormattedMessage id="tsvb.dataFormatPicker.fromLabel" defaultMessage="From" />
<FormattedMessage id="visTypeTimeseries.dataFormatPicker.fromLabel" defaultMessage="From" />
}
>
<EuiComboBox
@ -196,7 +196,7 @@ class DataFormatPickerUI extends Component {
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('to')}
label={<FormattedMessage id="tsvb.dataFormatPicker.toLabel" defaultMessage="To" />}
label={<FormattedMessage id="visTypeTimeseries.dataFormatPicker.toLabel" defaultMessage="To" />}
>
<EuiComboBox
isClearable={false}
@ -214,7 +214,7 @@ class DataFormatPickerUI extends Component {
id={htmlId('decimal')}
label={
<FormattedMessage
id="tsvb.dataFormatPicker.decimalPlacesLabel"
id="visTypeTimeseries.dataFormatPicker.decimalPlacesLabel"
defaultMessage="Decimal places"
/>
}
@ -237,14 +237,14 @@ class DataFormatPickerUI extends Component {
<EuiFormRow
label={
<FormattedMessage
id="tsvb.dataFormatPicker.formatStringLabel"
id="visTypeTimeseries.dataFormatPicker.formatStringLabel"
defaultMessage="Format string"
/>
}
helpText={
<span>
<FormattedMessage
id="tsvb.dataFormatPicker.formatStringHelpText"
id="visTypeTimeseries.dataFormatPicker.formatStringHelpText"
defaultMessage="See {numeralJsLink}"
values={{
numeralJsLink: (
@ -286,7 +286,7 @@ class DataFormatPickerUI extends Component {
}
DataFormatPickerUI.defaultProps = {
label: i18n.translate('tsvb.defaultDataFormatterLabel', { defaultMessage: 'Data Formatter' }),
label: i18n.translate('visTypeTimeseries.defaultDataFormatterLabel', { defaultMessage: 'Data Formatter' }),
};
DataFormatPickerUI.propTypes = {

View file

@ -62,7 +62,7 @@ export function ErrorComponent(props) {
{title || (
<FormattedMessage
id="tsvb.error.requestForPanelFailedErrorMessage"
id="visTypeTimeseries.error.requestForPanelFailedErrorMessage"
defaultMessage="The request for this panel failed"
/>
)}

View file

@ -26,67 +26,67 @@ import { ICON_TYPES_MAP } from '../../visualizations/constants/icons';
export const ICONS = [
{
value: 'fa-asterisk',
label: i18n.translate('tsvb.iconSelect.asteriskLabel', { defaultMessage: 'Asterisk' }),
label: i18n.translate('visTypeTimeseries.iconSelect.asteriskLabel', { defaultMessage: 'Asterisk' }),
},
{
value: 'fa-bell',
label: i18n.translate('tsvb.iconSelect.bellLabel', { defaultMessage: 'Bell' }),
label: i18n.translate('visTypeTimeseries.iconSelect.bellLabel', { defaultMessage: 'Bell' }),
},
{
value: 'fa-bolt',
label: i18n.translate('tsvb.iconSelect.boltLabel', { defaultMessage: 'Bolt' }),
label: i18n.translate('visTypeTimeseries.iconSelect.boltLabel', { defaultMessage: 'Bolt' }),
},
{
value: 'fa-comment',
label: i18n.translate('tsvb.iconSelect.commentLabel', { defaultMessage: 'Comment' }),
label: i18n.translate('visTypeTimeseries.iconSelect.commentLabel', { defaultMessage: 'Comment' }),
},
{
value: 'fa-map-marker',
label: i18n.translate('tsvb.iconSelect.mapMarkerLabel', { defaultMessage: 'Map Marker' }),
label: i18n.translate('visTypeTimeseries.iconSelect.mapMarkerLabel', { defaultMessage: 'Map Marker' }),
},
{
value: 'fa-map-pin',
label: i18n.translate('tsvb.iconSelect.mapPinLabel', { defaultMessage: 'Map Pin' }),
label: i18n.translate('visTypeTimeseries.iconSelect.mapPinLabel', { defaultMessage: 'Map Pin' }),
},
{
value: 'fa-star',
label: i18n.translate('tsvb.iconSelect.starLabel', { defaultMessage: 'Star' }),
label: i18n.translate('visTypeTimeseries.iconSelect.starLabel', { defaultMessage: 'Star' }),
},
{
value: 'fa-tag',
label: i18n.translate('tsvb.iconSelect.tagLabel', { defaultMessage: 'Tag' }),
label: i18n.translate('visTypeTimeseries.iconSelect.tagLabel', { defaultMessage: 'Tag' }),
},
{
value: 'fa-bomb',
label: i18n.translate('tsvb.iconSelect.bombLabel', { defaultMessage: 'Bomb' }),
label: i18n.translate('visTypeTimeseries.iconSelect.bombLabel', { defaultMessage: 'Bomb' }),
},
{
value: 'fa-bug',
label: i18n.translate('tsvb.iconSelect.bugLabel', { defaultMessage: 'Bug' }),
label: i18n.translate('visTypeTimeseries.iconSelect.bugLabel', { defaultMessage: 'Bug' }),
},
{
value: 'fa-exclamation-circle',
label: i18n.translate('tsvb.iconSelect.exclamationCircleLabel', {
label: i18n.translate('visTypeTimeseries.iconSelect.exclamationCircleLabel', {
defaultMessage: 'Exclamation Circle',
}),
},
{
value: 'fa-exclamation-triangle',
label: i18n.translate('tsvb.iconSelect.exclamationTriangleLabel', {
label: i18n.translate('visTypeTimeseries.iconSelect.exclamationTriangleLabel', {
defaultMessage: 'Exclamation Triangle',
}),
},
{
value: 'fa-fire',
label: i18n.translate('tsvb.iconSelect.fireLabel', { defaultMessage: 'Fire' }),
label: i18n.translate('visTypeTimeseries.iconSelect.fireLabel', { defaultMessage: 'Fire' }),
},
{
value: 'fa-flag',
label: i18n.translate('tsvb.iconSelect.flagLabel', { defaultMessage: 'Flag' }),
label: i18n.translate('visTypeTimeseries.iconSelect.flagLabel', { defaultMessage: 'Flag' }),
},
{
value: 'fa-heart',
label: i18n.translate('tsvb.iconSelect.heartLabel', { defaultMessage: 'Heart' }),
label: i18n.translate('visTypeTimeseries.iconSelect.heartLabel', { defaultMessage: 'Heart' }),
},
];

View file

@ -29,7 +29,7 @@ describe('src/legacy/core_plugins/metrics/public/components/icon_select/icon_sel
expect(wrapper).toMatchSnapshot();
});
test("should put the default value if the passed one does't match with icons collection", () => {
test('should put the default value if the passed one does not match with icons collection', () => {
const wrapper = shallow(<IconSelect onChange={jest.fn()} value="unknown" />);
expect(wrapper.prop('selectedOptions')).toEqual([ICONS[0]]);

View file

@ -77,14 +77,14 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
const timeRangeOptions = [
{
label: i18n.translate('tsvb.indexPattern.timeRange.lastValue', {
label: i18n.translate('visTypeTimeseries.indexPattern.timeRange.lastValue', {
defaultMessage: 'Last value',
}),
value: TIME_RANGE_DATA_MODES.LAST_VALUE,
disabled: !isTimerangeModeEnabled(TIME_RANGE_DATA_MODES.LAST_VALUE, uiRestrictions),
},
{
label: i18n.translate('tsvb.indexPattern.timeRange.entireTimeRange', {
label: i18n.translate('visTypeTimeseries.indexPattern.timeRange.entireTimeRange', {
defaultMessage: 'Entire time range',
}),
value: TIME_RANGE_DATA_MODES.ENTIRE_TIME_RANGE,
@ -117,13 +117,13 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
<EuiFlexItem>
<EuiFormRow
id={htmlId('timeRange')}
label={i18n.translate('tsvb.indexPattern.timeRange.label', {
label={i18n.translate('visTypeTimeseries.indexPattern.timeRange.label', {
defaultMessage: 'Data timerange mode',
})}
>
<EuiComboBox
isClearable={false}
placeholder={i18n.translate('tsvb.indexPattern.timeRange.selectTimeRange', {
placeholder={i18n.translate('visTypeTimeseries.indexPattern.timeRange.selectTimeRange', {
defaultMessage: 'Select',
})}
options={timeRangeOptions}
@ -134,7 +134,7 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
/>
</EuiFormRow>
<EuiText size="xs" style={{ margin: 0 }}>
{i18n.translate('tsvb.indexPattern.timeRange.hint', {
{i18n.translate('visTypeTimeseries.indexPattern.timeRange.hint', {
defaultMessage: `This setting controls the timespan used for matching documents.
"Entire timerange" will match all the documents selected in the timepicker.
"Last value" will match only the documents for the specified interval from the end of the timerange.`,
@ -147,10 +147,10 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
<EuiFlexItem>
<EuiFormRow
id={htmlId('indexPattern')}
label={i18n.translate('tsvb.indexPatternLabel', { defaultMessage: 'Index pattern' })}
label={i18n.translate('visTypeTimeseries.indexPatternLabel', { defaultMessage: 'Index pattern' })}
helpText={
isDefaultIndexPatternUsed &&
i18n.translate('tsvb.indexPattern.searchByDefaultIndex', {
i18n.translate('visTypeTimeseries.indexPattern.searchByDefaultIndex', {
defaultMessage: 'Default index pattern is used. To query all indexes use *',
})
}
@ -167,7 +167,7 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
<EuiFlexItem>
<EuiFormRow
id={htmlId('timeField')}
label={i18n.translate('tsvb.indexPattern.timeFieldLabel', {
label={i18n.translate('visTypeTimeseries.indexPattern.timeFieldLabel', {
defaultMessage: 'Time field',
})}
>
@ -188,10 +188,10 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
isInvalid={!intervalValidation.isValid}
error={intervalValidation.errorMessage}
id={htmlId('interval')}
label={i18n.translate('tsvb.indexPattern.intervalLabel', {
label={i18n.translate('visTypeTimeseries.indexPattern.intervalLabel', {
defaultMessage: 'Interval',
})}
helpText={i18n.translate('tsvb.indexPattern.intervalHelpText', {
helpText={i18n.translate('visTypeTimeseries.indexPattern.intervalHelpText', {
defaultMessage: 'Examples: auto, 1m, 1d, 7d, 1y, >=1m',
description:
'auto, 1m, 1d, 7d, 1y, >=1m are required values and must not be translated.',
@ -209,7 +209,7 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('dropLastBucket')}
label={i18n.translate('tsvb.indexPattern.dropLastBucketLabel', {
label={i18n.translate('visTypeTimeseries.indexPattern.dropLastBucketLabel', {
defaultMessage: 'Drop last bucket?',
})}
>

Some files were not shown because too many files have changed in this diff Show more