Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Fix table factory usage. #52486

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
import { AnalyticsViewAction } from '../../../data_frame_analytics/pages/analytics_management/components/analytics_list/actions';
import { formatHumanReadableDateTimeSeconds } from '../../../util/date_utils';

const MlInMemoryTable = mlInMemoryTableFactory<DataFrameAnalyticsListRow>();

interface Props {
items: DataFrameAnalyticsListRow[];
}
Expand Down Expand Up @@ -113,8 +115,6 @@ export const AnalyticsTable: FC<Props> = ({ items }) => {
},
};

const MlInMemoryTable = mlInMemoryTableFactory<DataFrameAnalyticsListRow>();

return (
<MlInMemoryTable
allowNeutralSort={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import { JobSelectorBadge } from '../../../components/job_selector/job_selector_
import { toLocaleString } from '../../../util/string_utils';
import { getSeverityColor } from '../../../../../common/util/anomaly_utils';

const MlInMemoryTable = mlInMemoryTableFactory<Group>();

// Used to pass on attribute names to table columns
export enum AnomalyDetectionListColumns {
id = 'id',
Expand Down Expand Up @@ -195,8 +197,6 @@ export const AnomalyDetectionTable: FC<Props> = ({ items, jobsList, statsBarData
},
};

const MlInMemoryTable = mlInMemoryTableFactory<Group>();

return (
<Fragment>
<EuiFlexGroup alignItems="center" justifyContent="spaceBetween">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { ES_FIELD_TYPES } from '../../../../../../../../../../src/plugins/data/p
import { formatHumanReadableDateTimeSeconds } from '../../../../../../common/utils/date_utils';
import { transformTableFactory } from './transform_table';

const TransformTable = transformTableFactory<EsDoc>();

interface Props {
transformConfig: TransformPivotConfig;
}
Expand Down Expand Up @@ -197,8 +199,6 @@ export const ExpandedRowPreviewPane: FC<Props> = ({ transformConfig }) => {
const transformTableLoading = previewData.length === 0 && isLoading === true;
const dataTestSubj = `transformPreviewTabContent${!transformTableLoading ? ' loaded' : ''}`;

const TransformTable = transformTableFactory<EsDoc>();

return (
<div data-test-subj={dataTestSubj}>
<TransformTable
Expand Down