Skip to content

Commit

Permalink
[ML] Fix partition value selection on the Single Metric Viewer (#81585)…
Browse files Browse the repository at this point in the history
… (#81599)

* [ML] remove tooltip wrapper for partition value control

* [ML] add spacer
  • Loading branch information
darnautov committed Oct 26, 2020
1 parent 49928b3 commit da05392
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
}
}

.single-metric-request-callout {
margin: 0 $euiSize;
}

.results-container {
.panel-title {
font-size: $euiFontSizeM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ import React, { Component } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';

import {
EuiComboBox,
EuiComboBoxOptionOption,
EuiFlexItem,
EuiFormRow,
EuiToolTip,
} from '@elastic/eui';
import { EuiComboBox, EuiComboBoxOptionOption, EuiFlexItem, EuiFormRow } from '@elastic/eui';

export interface Entity {
fieldName: string;
Expand Down Expand Up @@ -156,9 +150,7 @@ export class EntityControl extends Component<EntityControlProps, EntityControlSt
return (
<EuiFlexItem grow={false}>
<EuiFormRow label={entity.fieldName} helpText={forceSelection ? selectMessage : null}>
<EuiToolTip position="right" content={forceSelection ? selectMessage : null}>
{control}
</EuiToolTip>
{control}
</EuiFormRow>
</EuiFlexItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,23 +1133,25 @@ export class TimeSeriesExplorer extends React.Component {
return (
<TimeSeriesExplorerPage dateFormatTz={dateFormatTz} resizeRef={this.resizeRef}>
{fieldNamesWithEmptyValues.length > 0 && (
<EuiCallOut
className="single-metric-request-callout"
title={
<FormattedMessage
id="xpack.ml.timeSeriesExplorer.singleMetricRequiredMessage"
defaultMessage="To view a single metric you must select {missingValuesCount, plural, one {a value for {fieldName1}} other {values for {fieldName1} and {fieldName2}}}"
values={{
missingValuesCount: fieldNamesWithEmptyValues.length,
fieldName1: fieldNamesWithEmptyValues[0],
fieldName2: fieldNamesWithEmptyValues[1],
}}
/>
}
color="warning"
iconType="help"
size="s"
/>
<>
<EuiCallOut
title={
<FormattedMessage
id="xpack.ml.timeSeriesExplorer.singleMetricRequiredMessage"
defaultMessage="To view a single metric you must select {missingValuesCount, plural, one {a value for {fieldName1}} other {values for {fieldName1} and {fieldName2}}}"
values={{
missingValuesCount: fieldNamesWithEmptyValues.length,
fieldName1: fieldNamesWithEmptyValues[0],
fieldName2: fieldNamesWithEmptyValues[1],
}}
/>
}
color="warning"
iconType="help"
size="s"
/>
<EuiSpacer size="m" />
</>
)}

<div className="series-controls" data-test-subj="mlSingleMetricViewerSeriesControls">
Expand Down

0 comments on commit da05392

Please sign in to comment.