Skip to content

Commit

Permalink
fixed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Feb 10, 2020
1 parent 672f38b commit 438eed5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
import * as React from 'react';
import uuid from 'uuid';
import { shallow } from 'enzyme';
import {
AlertInstances,
alertInstancesTableColumns,
AlertInstanceListItem,
alertInstanceToListItem,
} from './alert_instances';
import { AlertInstances, AlertInstanceListItem, alertInstanceToListItem } from './alert_instances';
import { Alert, AlertTaskState, RawAlertInstance } from '../../../../types';
import { EuiBasicTable } from '@elastic/eui';

Expand All @@ -23,7 +18,6 @@ const mockAPIs = {
unmuteAlertInstance: jest.fn(),
requestRefresh: jest.fn(),
};
const onMuteAction = jest.fn();

beforeAll(() => {
jest.resetAllMocks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import React, { Fragment } from 'react';
import moment, { Duration } from 'moment';
import { i18n } from '@kbn/i18n';
import { EuiBasicTable, EuiButtonToggle, EuiBadge, RIGHT_ALIGNMENT } from '@elastic/eui';
import { EuiBasicTable, EuiButtonToggle, EuiBadge } from '@elastic/eui';
// @ts-ignore
import { RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from '@elastic/eui/lib/services';
import { padLeft, difference } from 'lodash';
import { FormattedMessage } from '@kbn/i18n/react';
import { RawAlertInstance } from '../../../../../../../legacy/plugins/alerting/common';
Expand Down Expand Up @@ -59,6 +61,7 @@ export const alertInstancesTableColumns = (
},
{
field: 'duration',
align: CENTER_ALIGNMENT,
render: (value: number, instance: AlertInstanceListItem) => {
return value ? durationAsString(moment.duration(value)) : '';
},
Expand All @@ -71,7 +74,11 @@ export const alertInstancesTableColumns = (
},
{
field: '',
alignment: RIGHT_ALIGNMENT,
align: RIGHT_ALIGNMENT,
name: i18n.translate(
'xpack.triggersActionsUI.sections.alertDetails.alertInstancesList.columns.actions',
{ defaultMessage: 'Actions' }
),
render: (instance: AlertInstanceListItem) => {
return (
<Fragment>
Expand All @@ -96,10 +103,6 @@ export const alertInstancesTableColumns = (
</Fragment>
);
},
name: i18n.translate(
'xpack.triggersActionsUI.sections.alertDetails.alertInstancesList.columns.actions',
{ defaultMessage: 'Actions' }
),
sortable: false,
'data-test-subj': 'alertInstancesTableCell-actions',
},
Expand Down

0 comments on commit 438eed5

Please sign in to comment.