diff --git a/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.js b/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.js index 2457b67ab9d38..d3917412bfb7b 100644 --- a/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.js +++ b/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.js @@ -70,7 +70,7 @@ export const EntityCell = function EntityCell({ filter, wrapText = false, }) { - let valueText = entityValue === '' ? EMPTY_FIELD_VALUE_LABEL : entityValue; + let valueText = entityValue === '' ? {EMPTY_FIELD_VALUE_LABEL} : entityValue; if (entityName === MLCATEGORY) { valueText = `${MLCATEGORY} ${valueText}`; } diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/entity_control/entity_control.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/entity_control/entity_control.tsx index 16b592de2ace3..09a1867805106 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/entity_control/entity_control.tsx +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/entity_control/entity_control.tsx @@ -16,6 +16,7 @@ import { EuiFormRow, EuiToolTip, } from '@elastic/eui'; +import { EuiSelectableOption } from '@elastic/eui/src/components/selectable/selectable_option'; export interface Entity { fieldName: string; @@ -38,7 +39,12 @@ interface EntityControlState { options: Array> | undefined; } -export const EMPTY_FIELD_VALUE_LABEL = '""'; +export const EMPTY_FIELD_VALUE_LABEL = i18n.translate( + 'xpack.ml.timeSeriesExplorer.emptyPartitionFieldLabel.', + { + defaultMessage: 'blank (empty string)', + } +); export class EntityControl extends Component { inputRef: any; @@ -107,6 +113,11 @@ export class EntityControl extends Component { + const { label } = option; + return label === EMPTY_FIELD_VALUE_LABEL ? {label} : label; + }; + render() { const { entity, forceSelection } = this.props; const { isLoading, options, selectedOptions } = this.state; @@ -130,6 +141,7 @@ export class EntityControl extends Component );