Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Sep 10, 2020
1 parent 137d0b1 commit 1f46dda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 4 additions & 7 deletions x-pack/plugins/apm/common/anomaly_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ export function getSeverityColor(theme: EuiTheme, severity?: Severity) {
}

export function getSeverityLabel(severity?: Severity) {
let label: string = '';

switch (severity) {
case Severity.critical:
label = i18n.translate(
return i18n.translate(
'xpack.apm.servicesTable.serviceHealthStatus.critical',
{
defaultMessage: 'Critical',
Expand All @@ -68,7 +66,7 @@ export function getSeverityLabel(severity?: Severity) {

case Severity.major:
case Severity.minor:
label = i18n.translate(
return i18n.translate(
'xpack.apm.servicesTable.serviceHealthStatus.warning',
{
defaultMessage: 'Warning',
Expand All @@ -77,7 +75,7 @@ export function getSeverityLabel(severity?: Severity) {
break;

case Severity.warning:
label = i18n.translate(
return i18n.translate(
'xpack.apm.servicesTable.serviceHealthStatus.healthy',
{
defaultMessage: 'Healthy',
Expand All @@ -86,15 +84,14 @@ export function getSeverityLabel(severity?: Severity) {
break;

default:
label = i18n.translate(
return i18n.translate(
'xpack.apm.servicesTable.serviceHealthStatus.unknown',
{
defaultMessage: 'Unknown',
}
);
break;
}
return label;
}

export const ML_ERRORS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import moment from 'moment';
// @ts-expect-error
import { calculateAuto } from './calculate_auto';
// @ts-expect-error
import { unitToSeconds } from './unit_to_seconds';

export function getBucketSize(
start: number,
Expand Down

0 comments on commit 1f46dda

Please sign in to comment.