Skip to content

Commit

Permalink
[ML] Transform: Table enhancements (elastic#69307)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
qn895 and elasticmachine committed Jun 23, 2020
1 parent b2d3833 commit 1158be9
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 381 deletions.
3 changes: 1 addition & 2 deletions x-pack/plugins/ml/public/shared.ts
Expand Up @@ -14,10 +14,9 @@ export * from '../common/types/audit_message';

export * from '../common/util/anomaly_utils';
export * from '../common/util/errors';

export * from '../common/util/validators';

export * from './application/formatters/metric_change_description';

export * from './application/components/data_grid';
export * from './application/data_frame_analytics/common';
export * from './application/util/date_utils';
22 changes: 0 additions & 22 deletions x-pack/plugins/transform/common/utils/date_utils.ts

This file was deleted.

2 changes: 2 additions & 0 deletions x-pack/plugins/transform/public/app/common/transform.ts
Expand Up @@ -54,6 +54,8 @@ export interface CreateRequestBody extends PreviewRequestBody {

export interface TransformPivotConfig extends CreateRequestBody {
id: TransformId;
create_time?: number;
version?: string;
}

export enum REFRESH_TRANSFORM_LIST_STATE {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/transform/public/app/common/transform_list.ts
Expand Up @@ -10,8 +10,6 @@ import { TransformStats } from './transform_stats';

// Used to pass on attribute names to table columns
export enum TRANSFORM_LIST_COLUMN {
CONFIG_DEST_INDEX = 'config.dest.index',
CONFIG_SOURCE_INDEX = 'config.source.index',
DESCRIPTION = 'config.description',
ID = 'id',
}
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/transform/public/app/hooks/use_api.ts
Expand Up @@ -54,7 +54,9 @@ export const useApi = () => {
});
},
getTransformsPreview(obj: PreviewRequestBody): Promise<GetTransformsResponse> {
return http.post(`${API_BASE_PATH}transforms/_preview`, { body: JSON.stringify(obj) });
return http.post(`${API_BASE_PATH}transforms/_preview`, {
body: JSON.stringify(obj),
});
},
startTransforms(
transformsInfo: TransformEndpointRequest[]
Expand Down
Expand Up @@ -14,7 +14,7 @@ import { i18n } from '@kbn/i18n';
import { ES_FIELD_TYPES } from '../../../../../../src/plugins/data/common';

import { dictionaryToArray } from '../../../common/types/common';
import { formatHumanReadableDateTimeSeconds } from '../../../common/utils/date_utils';
import { formatHumanReadableDateTimeSeconds } from '../../shared_imports';
import { getNestedProperty } from '../../../common/utils/object_utils';

import {
Expand Down

This file was deleted.

Expand Up @@ -13,7 +13,6 @@ describe('Transform: Transform List Actions', () => {
const actions = getActions({ forceDisable: false });

expect(actions).toHaveLength(4);
expect(actions[0].isPrimary).toBeTruthy();
expect(typeof actions[0].render).toBe('function');
expect(typeof actions[1].render).toBe('function');
expect(typeof actions[2].render).toBe('function');
Expand Down
Expand Up @@ -19,7 +19,6 @@ import { StopAction } from './action_stop';
export const getActions = ({ forceDisable }: { forceDisable: boolean }) => {
return [
{
isPrimary: true,
render: (item: TransformListRow) => {
if (item.stats.state === TRANSFORM_STATE.STOPPED) {
return <StartAction items={[item]} forceDisable={forceDisable} />;
Expand Down

0 comments on commit 1158be9

Please sign in to comment.