Skip to content

Commit

Permalink
Closes #65404 by updating text and considtionally displaying tooltip (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed May 6, 2020
1 parent 3d43166 commit 138303d
Showing 1 changed file with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ const ANOMALY_DETECTION_TITLE = i18n.translate(
{ defaultMessage: 'Anomaly Detection' }
);

const ANOMALY_DETECTION_INFO = i18n.translate(
'xpack.apm.serviceMap.anomalyDetectionPopoverInfo',
const ANOMALY_DETECTION_TOOLTIP = i18n.translate(
'xpack.apm.serviceMap.anomalyDetectionPopoverTooltip',
{
defaultMessage:
'Display the health of your service by enabling the anomaly detection feature in Machine Learning.'
'Service health indicators are powered by the anomaly detection feature in machine learning'
}
);

Expand All @@ -108,11 +108,11 @@ const ANOMALY_DETECTION_LINK = i18n.translate(
{ defaultMessage: 'View anomalies' }
);

const ANOMALY_DETECTION_ENABLE_TEXT = i18n.translate(
'xpack.apm.serviceMap.anomalyDetectionPopoverEnable',
const ANOMALY_DETECTION_DISABLED_TEXT = i18n.translate(
'xpack.apm.serviceMap.anomalyDetectionPopoverDisabled',
{
defaultMessage:
'Enable anomaly detection from the Integrations menu in the Service details view.'
'Display service health indicators by enabling anomaly detection from the Integrations menu in the Service details view.'
}
);

Expand Down Expand Up @@ -154,15 +154,18 @@ export function Contents({
</FlexColumnItem>
{isService && (
<FlexColumnItem>
<section>
<HealthStatusTitle size="xxs">
<h3>{ANOMALY_DETECTION_TITLE}</h3>
</HealthStatusTitle>
&nbsp;
<EuiIconTip type="iInCircle" content={ANOMALY_DETECTION_INFO} />
</section>
{hasAnomalyDetection ? (
<>
<section>
<HealthStatusTitle size="xxs">
<h3>{ANOMALY_DETECTION_TITLE}</h3>
</HealthStatusTitle>
&nbsp;
<EuiIconTip
type="iInCircle"
content={ANOMALY_DETECTION_TOOLTIP}
/>
</section>
<ContentLine>
<EuiFlexGroup>
<EuiFlexItem>
Expand All @@ -188,7 +191,12 @@ export function Contents({
</ContentLine>
</>
) : (
<EnableText>{ANOMALY_DETECTION_ENABLE_TEXT}</EnableText>
<>
<HealthStatusTitle size="xxs">
<h3>{ANOMALY_DETECTION_TITLE}</h3>
</HealthStatusTitle>
<EnableText>{ANOMALY_DETECTION_DISABLED_TEXT}</EnableText>
</>
)}
<EuiHorizontalRule margin="xs" />
</FlexColumnItem>
Expand Down

0 comments on commit 138303d

Please sign in to comment.