Skip to content

Commit

Permalink
removed the old anomaly detection logic from service map popover cont…
Browse files Browse the repository at this point in the history
…ents, since it's been moved to a new component.
  • Loading branch information
ogupte committed Jun 16, 2020
1 parent 4fbe5a1 commit e8efe2d
Showing 1 changed file with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { useContext, MouseEvent } from 'react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
EuiTitle,
} from '@elastic/eui';
import cytoscape from 'cytoscape';
import { ThemeContext } from 'styled-components';
import React, { MouseEvent } from 'react';
import { Buttons } from './Buttons';
import { Info } from './Info';
import { ServiceMetricFetcher } from './ServiceMetricFetcher';
Expand Down Expand Up @@ -59,25 +58,6 @@ export const Contents = ({
onFocusClick,
selectedNodeServiceName,
}: ContentsProps) => {
const theme = useContext(ThemeContext);

// Anomaly Detection
const severity = selectedNodeData.severity;
const maxScore = selectedNodeData.max_score;
const actualValue = selectedNodeData.actual_value;
const typicalValue = selectedNodeData.typical_value;
const jobId = selectedNodeData.job_id;
const hasAnomalyDetection = [
severity,
maxScore,
actualValue,
typicalValue,
jobId,
].every((value) => value !== undefined);
const anomalyDescription = hasAnomalyDetection
? getMetricChangeDescription(actualValue, typicalValue).message
: null;

return (
<FlexColumnGroup
direction="column"
Expand Down

0 comments on commit e8efe2d

Please sign in to comment.