Skip to content

Commit

Permalink
[ML] handle empty string label, fix translation key
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Oct 6, 2020
1 parent f34d0f3 commit d1d2c72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const AnomalyTimeline: FC<AnomalyTimelineProps> = React.memo(
<EuiFlexItem grow={false}>
<EuiButtonEmpty size="xs" onClick={setSelectedCells.bind(null, undefined)}>
<FormattedMessage
id="xpack.ml.anomalySwimLane.clearSelectionLabel"
id="xpack.ml.explorer.clearSelectionLabel"
defaultMessage="Clear selection"
/>
</EuiButtonEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { formatHumanReadableDateTime } from '../../../common/util/date_utils';
import { getFormattedSeverityScore } from '../../../common/util/anomaly_utils';

import './_explorer.scss';
import { EMPTY_FIELD_VALUE_LABEL } from '../timeseriesexplorer/components/entity_control/entity_control';

/**
* Ignore insignificant resize, e.g. browser scrollbar appearance.
Expand Down Expand Up @@ -273,6 +274,9 @@ export const SwimlaneContainer: FC<SwimlaneProps> = ({
// eui color subdued
fill: `#6a717d`,
padding: 8,
formatter: (laneLabel: string) => {
return laneLabel === '' ? EMPTY_FIELD_VALUE_LABEL : laneLabel;
},
},
xAxisLabel: {
visible: showTimeline,
Expand Down

0 comments on commit d1d2c72

Please sign in to comment.