)}
fullWidth
- helpText={
-
- This field uses basic math expressions (see{' '}
-
- TinyMath
- ) - Variables are keys on the params object,
- i.e. params.<name> To access all the data use
- params._all.<name>.values for an array of the
- values and params._all.<name>.timestamps
- for an array of the timestamps. params._timestamp
- is available for the current bucket's timestamp,
- params._index is available for the current
- bucket's index, and params._intervals
- available for the interval in milliseconds.
-
- }
+ helpText={(
+
+ ),
+ params: (params),
+ paramsName: (params.<name>),
+ paramsValues: (params._all.<name>.values),
+ paramsTimestamps: (params._all.<name>.timestamps),
+ paramsTimestamp: (params._timestamp),
+ paramsIndex: (params._index),
+ paramsInterval: (params._interval)
+ }}
+ />)}
>
{
@@ -58,8 +59,8 @@ export function filterRows(includeSiblings) {
};
}
-function MetricSelect(props) {
- const { additionalOptions, restrict, metric, metrics, onChange, value, exclude, includeSiblings, clearable, ...rest } = props;
+function MetricSelectUi(props) {
+ const { additionalOptions, restrict, metric, metrics, onChange, value, exclude, includeSiblings, clearable, intl, ...rest } = props;
const calculatedMetrics = metrics.filter(createTypeFilter(restrict, exclude));
@@ -97,7 +98,7 @@ function MetricSelect(props) {
return (
{
- const { siblings } = props;
+const MovingAverageAggUi = props => {
+ const { siblings, intl } = props;
const defaults = {
settings: '',
minimize: 0,
@@ -52,11 +53,27 @@ export const MovingAverageAgg = props => {
const handleTextChange = createTextHandler(handleChange);
const handleNumberChange = createNumberHandler(handleChange);
const modelOptions = [
- { label: 'Simple', value: 'simple' },
- { label: 'Linear', value: 'linear' },
- { label: 'Exponentially Weighted', value: 'ewma' },
- { label: 'Holt-Linear', value: 'holt' },
- { label: 'Holt-Winters', value: 'holt_winters' }
+ {
+ label: intl.formatMessage({ id: 'tsvb.movingAverage.modelOptions.simpleLabel', defaultMessage: 'Simple' }),
+ value: 'simple'
+ },
+ {
+ label: intl.formatMessage({ id: 'tsvb.movingAverage.modelOptions.linearLabel', defaultMessage: 'Linear' }),
+ value: 'linear'
+ },
+ {
+ label: intl.formatMessage({
+ id: 'tsvb.movingAverage.modelOptions.exponentiallyWeightedLabel', defaultMessage: 'Exponentially Weighted' }),
+ value: 'ewma'
+ },
+ {
+ label: intl.formatMessage({ id: 'tsvb.movingAverage.modelOptions.holtLinearLabel', defaultMessage: 'Holt-Linear' }),
+ value: 'holt'
+ },
+ {
+ label: intl.formatMessage({ id: 'tsvb.movingAverage.modelOptions.holtWintersLabel', defaultMessage: 'Holt-Winters' }),
+ value: 'holt_winters'
+ }
];
const minimizeOptions = [
{ label: 'True', value: 1 },
@@ -80,7 +97,12 @@ export const MovingAverageAgg = props => {
>
- Aggregation
+
+
+
{
)}
>
{
)}
>
{