diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__mocks__/data_frame_transform_list_row.json b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__mocks__/data_frame_transform_list_row.json
index 5165c693326a..6723e8f749e8 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__mocks__/data_frame_transform_list_row.json
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__mocks__/data_frame_transform_list_row.json
@@ -1,19 +1,36 @@
{
"config": {
"id": "fq_date_histogram_1m_1441",
- "source": { "index": ["farequote-2019"], "query": { "match_all": {} } },
- "dest": { "index": "fq_date_histogram_1m_1441" },
+ "source": {
+ "index": [
+ "farequote-2019"
+ ],
+ "query": {
+ "match_all": { }
+ }
+ },
+ "dest": {
+ "index": "fq_date_histogram_1m_1441"
+ },
"pivot": {
"group_by": {
"@timestamp": {
- "date_histogram": { "field": "@timestamp", "calendar_interval": "1m" }
+ "date_histogram": {
+ "field": "@timestamp",
+ "calendar_interval": "1m"
+ }
}
},
- "aggregations": { "responsetime.avg": { "avg": { "field": "responsetime" } } }
+ "aggregations": {
+ "responsetime.avg": {
+ "avg": {
+ "field": "responsetime"
+ }
+ }
+ }
},
"version": "8.0.0",
- "create_time": 1564388146667,
- "mode": "batch"
+ "create_time": 1564388146667
},
"id": "fq_date_histogram_1m_1441",
"checkpointing": {
@@ -21,20 +38,12 @@
"checkpoint": 1,
"timestamp_millis": 1564388281199
},
- "next": {
- "checkpoint": 2,
- "indexer_state": "stopped",
- "checkpoint_progress": {
- "total_docs": 86274,
- "docs_remaining": 0,
- "percent_complete": 100
- }
- },
"operations_behind": 0
},
+ "mode": "batch",
"stats": {
"id": "fq_date_histogram_1m_1441",
- "task_state": "stopped",
+ "state": "stopped",
"stats": {
"pages_processed": 16,
"documents_processed": 86274,
@@ -52,15 +61,6 @@
"checkpoint": 1,
"timestamp_millis": 1564388281199
},
- "next": {
- "checkpoint": 2,
- "indexer_state": "stopped",
- "checkpoint_progress": {
- "total_docs": 86274,
- "docs_remaining": 0,
- "percent_complete": 100
- }
- },
"operations_behind": 0
}
}
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row.test.tsx.snap b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row.test.tsx.snap
index 9063535b4445..1744c2c2635b 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row.test.tsx.snap
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row.test.tsx.snap
@@ -17,7 +17,7 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
},
Object {
"description": "stopped",
- "title": "task_state",
+ "title": "state",
},
],
"position": "left",
@@ -26,16 +26,16 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
Object {
"items": Array [
Object {
- "description": "{\\"checkpoint\\":1,\\"timestamp_millis\\":1564388281199}",
- "title": "last",
+ "description": 1,
+ "title": "last.checkpoint",
},
Object {
- "description": "{\\"checkpoint\\":2,\\"indexer_state\\":\\"stopped\\",\\"checkpoint_progress\\":{\\"total_docs\\":86274,\\"docs_remaining\\":0,\\"percent_complete\\":100}}",
- "title": "next",
+ "description": "July 29th 2019, 04:18:01",
+ "title": "last.timestamp",
},
Object {
- "description": "0",
- "title": "operations_behind",
+ "description": 1564388281199,
+ "title": "last.timestamp_millis",
},
],
"position": "left",
@@ -110,7 +110,7 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
},
Object {
"description": "stopped",
- "title": "task_state",
+ "title": "state",
},
],
"position": "left",
@@ -119,16 +119,16 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
Object {
"items": Array [
Object {
- "description": "{\\"checkpoint\\":1,\\"timestamp_millis\\":1564388281199}",
- "title": "last",
+ "description": 1,
+ "title": "last.checkpoint",
},
Object {
- "description": "{\\"checkpoint\\":2,\\"indexer_state\\":\\"stopped\\",\\"checkpoint_progress\\":{\\"total_docs\\":86274,\\"docs_remaining\\":0,\\"percent_complete\\":100}}",
- "title": "next",
+ "description": "July 29th 2019, 04:18:01",
+ "title": "last.timestamp",
},
Object {
- "description": "0",
- "title": "operations_behind",
+ "description": 1564388281199,
+ "title": "last.timestamp_millis",
},
],
"position": "left",
@@ -195,7 +195,6 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
"index": "fq_date_histogram_1m_1441",
},
"id": "fq_date_histogram_1m_1441",
- "mode": "batch",
"pivot": Object {
"aggregations": Object {
"responsetime.avg": Object {
@@ -244,7 +243,6 @@ exports[`Data Frame: Transform List Minimal initialization 1`] =
"index": "fq_date_histogram_1m_1441",
},
"id": "fq_date_histogram_1m_1441",
- "mode": "batch",
"pivot": Object {
"aggregations": Object {
"responsetime.avg": Object {
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row_json_pane.test.tsx.snap b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row_json_pane.test.tsx.snap
index 3ff1f2652c3c..86f6e80d8f40 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row_json_pane.test.tsx.snap
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/__snapshots__/expanded_row_json_pane.test.tsx.snap
@@ -46,8 +46,7 @@ exports[`Data Frame: Transform List Expanded Row Minimal
}
},
\\"version\\": \\"8.0.0\\",
- \\"create_time\\": 1564388146667,
- \\"mode\\": \\"batch\\"
+ \\"create_time\\": 1564388146667
}"
/>
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/action_delete.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/action_delete.tsx
index 8787ef49492c..826cc6b75e11 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/action_delete.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/action_delete.tsx
@@ -21,14 +21,14 @@ import {
createPermissionFailureMessage,
} from '../../../../../privilege/check_privilege';
-import { DataFrameTransformListRow, DATA_FRAME_TASK_STATE } from './common';
+import { DataFrameTransformListRow, DATA_FRAME_TRANSFORM_STATE } from './common';
interface DeleteActionProps {
item: DataFrameTransformListRow;
}
export const DeleteAction: SFC = ({ item }) => {
- const disabled = item.stats.task_state === DATA_FRAME_TASK_STATE.STARTED;
+ const disabled = item.stats.state !== DATA_FRAME_TRANSFORM_STATE.STOPPED;
const canDeleteDataFrame: boolean = checkPermission('canDeleteDataFrame');
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/actions.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/actions.tsx
index 1aaa3df71f80..e6c3da495e6a 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/actions.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/actions.tsx
@@ -13,7 +13,7 @@ import {
createPermissionFailureMessage,
} from '../../../../../privilege/check_privilege';
-import { DataFrameTransformListRow, DATA_FRAME_TASK_STATE } from './common';
+import { DataFrameTransformListRow, DATA_FRAME_TRANSFORM_STATE } from './common';
import { stopTransform } from '../../services/transform_service';
import { StartAction } from './action_start';
@@ -26,7 +26,7 @@ export const getActions = () => {
{
isPrimary: true,
render: (item: DataFrameTransformListRow) => {
- if (item.stats.task_state !== DATA_FRAME_TASK_STATE.STARTED) {
+ if (item.stats.state === DATA_FRAME_TRANSFORM_STATE.STOPPED) {
return ;
}
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/columns.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/columns.tsx
index 9455fbe179f1..313fddc679d2 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/columns.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/columns.tsx
@@ -20,26 +20,29 @@ import {
import { DataFrameTransformId } from '../../../../common';
import {
getTransformProgress,
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
DataFrameTransformListColumn,
DataFrameTransformListRow,
DataFrameTransformStats,
} from './common';
import { getActions } from './actions';
-enum TASK_STATE_COLOR {
+enum STATE_COLOR {
+ aborting = 'warning',
failed = 'danger',
+ indexing = 'primary',
started = 'primary',
stopped = 'hollow',
+ stopping = 'hollow',
}
export const getTaskStateBadge = (
- state: DataFrameTransformStats['task_state'],
+ state: DataFrameTransformStats['state'],
reason?: DataFrameTransformStats['reason']
) => {
- const color = TASK_STATE_COLOR[state];
+ const color = STATE_COLOR[state];
- if (state === DATA_FRAME_TASK_STATE.FAILED && reason !== undefined) {
+ if (state === DATA_FRAME_TRANSFORM_STATE.FAILED && reason !== undefined) {
return (
@@ -126,10 +129,10 @@ export const getColumns = (
},
{
name: i18n.translate('xpack.ml.dataframe.status', { defaultMessage: 'Status' }),
- sortable: (item: DataFrameTransformListRow) => item.stats.task_state,
+ sortable: (item: DataFrameTransformListRow) => item.stats.state,
truncateText: true,
render(item: DataFrameTransformListRow) {
- return getTaskStateBadge(item.stats.task_state, item.stats.reason);
+ return getTaskStateBadge(item.stats.state, item.stats.reason);
},
width: '100px',
},
@@ -146,13 +149,17 @@ export const getColumns = (
},
{
name: i18n.translate('xpack.ml.dataframe.progress', { defaultMessage: 'Progress' }),
- sortable: getTransformProgress,
+ sortable: getTransformProgress || 0,
truncateText: true,
render(item: DataFrameTransformListRow) {
const progress = getTransformProgress(item);
const isBatchTransform = typeof item.config.sync === 'undefined';
+ if (progress === undefined && isBatchTransform === true) {
+ return null;
+ }
+
return (
{isBatchTransform && (
@@ -170,10 +177,14 @@ export const getColumns = (
{!isBatchTransform && (
- {item.stats.task_state === DATA_FRAME_TASK_STATE.STARTED && (
-
- )}
- {item.stats.task_state === DATA_FRAME_TASK_STATE.STOPPED && (
+ {/* If not stopped or failed show the animated progress bar */}
+ {item.stats.state !== DATA_FRAME_TRANSFORM_STATE.STOPPED &&
+ item.stats.state !== DATA_FRAME_TRANSFORM_STATE.FAILED && (
+
+ )}
+ {/* If stopped or failed show an empty (0%) progress bar */}
+ {(item.stats.state === DATA_FRAME_TRANSFORM_STATE.STOPPED ||
+ item.stats.state === DATA_FRAME_TRANSFORM_STATE.FAILED) && (
)}
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.test.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.test.ts
index 73483b516c7f..38ac75d46ca9 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.test.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.test.ts
@@ -9,7 +9,7 @@ import mockDataFrameTransformListRow from './__mocks__/data_frame_transform_list
import {
DataFrameTransformListRow,
isCompletedBatchTransform,
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
} from './common';
describe('Data Frame: isCompletedBatchTransform()', () => {
@@ -20,7 +20,7 @@ describe('Data Frame: isCompletedBatchTransform()', () => {
const row = mockDataFrameTransformListRow as DataFrameTransformListRow;
expect(row.stats.checkpointing.last.checkpoint === 1).toBe(true);
expect(row.config.sync === undefined).toBe(true);
- expect(row.stats.task_state === DATA_FRAME_TASK_STATE.STOPPED).toBe(true);
+ expect(row.stats.state === DATA_FRAME_TRANSFORM_STATE.STOPPED).toBe(true);
expect(isCompletedBatchTransform(mockDataFrameTransformListRow)).toBe(true);
// adapt the mock config to resemble a non-completed transform.
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.ts
index e99e54442ebf..d6b8ca1fbf18 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/common.ts
@@ -10,16 +10,14 @@ import { Dictionary } from '../../../../../../common/types/common';
import { DataFrameTransformId, DataFrameTransformPivotConfig } from '../../../../common';
-export enum DATA_FRAME_INDEXER_STATE {
- FAILED = 'failed',
- STARTED = 'started',
- STOPPED = 'stopped',
-}
-
-export enum DATA_FRAME_TASK_STATE {
+// reflects https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformStats.java#L243
+export enum DATA_FRAME_TRANSFORM_STATE {
+ ABORTING = 'aborting',
FAILED = 'failed',
+ INDEXING = 'indexing',
STARTED = 'started',
STOPPED = 'stopped',
+ STOPPING = 'stopping',
}
export enum DATA_FRAME_MODE {
@@ -50,9 +48,6 @@ export interface DataFrameTransformStats {
};
next?: {
checkpoint: number;
- // indexer_state is a backend internal attribute
- // and should not be considered in the UI.
- indexer_state: DATA_FRAME_INDEXER_STATE;
checkpoint_progress?: {
total_docs: number;
docs_remaining: number;
@@ -61,6 +56,13 @@ export interface DataFrameTransformStats {
};
operations_behind: number;
};
+ node?: {
+ id: string;
+ name: string;
+ ephemeral_id: string;
+ transport_address: string;
+ attributes: Record;
+ };
stats: {
documents_indexed: number;
documents_processed: number;
@@ -74,9 +76,7 @@ export interface DataFrameTransformStats {
trigger_count: number;
};
reason?: string;
- // task_state is the attribute to check against if a transform
- // is running or not.
- task_state: DATA_FRAME_TASK_STATE;
+ state: DATA_FRAME_TRANSFORM_STATE;
}
export function getTransformProgress(item: DataFrameTransformListRow) {
@@ -84,23 +84,22 @@ export function getTransformProgress(item: DataFrameTransformListRow) {
return 100;
}
- return Math.round(
- idx(item, _ => _.stats.checkpointing.next.checkpoint_progress.percent_complete) || 0
- );
+ const progress = idx(item, _ => _.stats.checkpointing.next.checkpoint_progress.percent_complete);
+
+ return progress !== undefined ? Math.round(progress) : undefined;
}
export function isDataFrameTransformStats(arg: any): arg is DataFrameTransformStats {
return (
typeof arg === 'object' &&
arg !== null &&
- {}.hasOwnProperty.call(arg, 'task_state') &&
- Object.values(DATA_FRAME_TASK_STATE).includes(arg.task_state)
+ {}.hasOwnProperty.call(arg, 'state') &&
+ Object.values(DATA_FRAME_TRANSFORM_STATE).includes(arg.state)
);
}
export interface DataFrameTransformListRow {
id: DataFrameTransformId;
- checkpointing: object;
config: DataFrameTransformPivotConfig;
mode?: string; // added property on client side to allow filtering by this field
stats: DataFrameTransformStats;
@@ -122,6 +121,6 @@ export function isCompletedBatchTransform(item: DataFrameTransformListRow) {
return (
item.stats.checkpointing.last.checkpoint === 1 &&
item.config.sync === undefined &&
- item.stats.task_state === DATA_FRAME_TASK_STATE.STOPPED
+ item.stats.state === DATA_FRAME_TRANSFORM_STATE.STOPPED
);
}
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.test.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.test.tsx
index 2922381026f7..62ee2a268e31 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.test.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.test.tsx
@@ -6,6 +6,7 @@
import { shallow } from 'enzyme';
import React from 'react';
+import moment from 'moment-timezone';
import { DataFrameTransformListRow } from './common';
import { ExpandedRow } from './expanded_row';
@@ -13,6 +14,15 @@ import { ExpandedRow } from './expanded_row';
import dataFrameTransformListRow from './__mocks__/data_frame_transform_list_row.json';
describe('Data Frame: Transform List ', () => {
+ // Set timezone to US/Eastern for consistent test results.
+ beforeEach(() => {
+ moment.tz.setDefault('US/Eastern');
+ });
+
+ afterEach(() => {
+ moment.tz.setDefault('Browser');
+ });
+
test('Minimal initialization', () => {
const item: DataFrameTransformListRow = dataFrameTransformListRow;
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.tsx
index 893c1c0c350b..0e2091d08ae8 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/expanded_row.tsx
@@ -10,6 +10,8 @@ import { EuiTabbedContent } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
+import { formatHumanReadableDateTimeSeconds } from '../../../../../util/date_utils';
+
import { DataFrameTransformListRow } from './common';
import { ExpandedRowDetailsPane, SectionConfig } from './expanded_row_details_pane';
import { ExpandedRowJsonPane } from './expanded_row_json_pane';
@@ -24,6 +26,11 @@ function getItemDescription(value: any) {
return value.toString();
}
+interface Item {
+ title: string;
+ description: any;
+}
+
interface Props {
item: DataFrameTransformListRow;
}
@@ -33,19 +40,92 @@ export const ExpandedRow: SFC = ({ item }) => {
delete stateValues.stats;
delete stateValues.checkpointing;
+ const stateItems: Item[] = [];
+ stateItems.push(
+ {
+ title: 'id',
+ description: item.id,
+ },
+ {
+ title: 'state',
+ description: item.stats.state,
+ }
+ );
+ if (item.stats.node !== undefined) {
+ stateItems.push(
+ {
+ title: 'node.id',
+ description: item.stats.node.id,
+ },
+ {
+ title: 'node.name',
+ description: item.stats.node.name,
+ },
+ {
+ title: 'node.ephemeral_id',
+ description: item.stats.node.ephemeral_id,
+ },
+ {
+ title: 'node.transport_address',
+ description: item.stats.node.transport_address,
+ },
+ {
+ title: 'node.attributes',
+ description: getItemDescription(item.stats.node.attributes),
+ }
+ );
+ }
+
const state: SectionConfig = {
title: 'State',
- items: Object.entries(stateValues).map(s => {
- return { title: s[0].toString(), description: getItemDescription(s[1]) };
- }),
+ items: stateItems,
position: 'left',
};
+ const checkpointingItems: Item[] = [];
+ if (item.stats.checkpointing.last !== undefined) {
+ checkpointingItems.push({
+ title: 'last.checkpoint',
+ description: item.stats.checkpointing.last.checkpoint,
+ });
+ if (item.stats.checkpointing.last.timestamp_millis !== undefined) {
+ checkpointingItems.push({
+ title: 'last.timestamp',
+ description: formatHumanReadableDateTimeSeconds(
+ item.stats.checkpointing.last.timestamp_millis
+ ),
+ });
+ checkpointingItems.push({
+ title: 'last.timestamp_millis',
+ description: item.stats.checkpointing.last.timestamp_millis,
+ });
+ }
+ }
+
+ if (item.stats.checkpointing.next !== undefined) {
+ checkpointingItems.push({
+ title: 'next.checkpoint',
+ description: item.stats.checkpointing.next.checkpoint,
+ });
+ if (item.stats.checkpointing.next.checkpoint_progress !== undefined) {
+ checkpointingItems.push({
+ title: 'next.checkpoint_progress.total_docs',
+ description: item.stats.checkpointing.next.checkpoint_progress.total_docs,
+ });
+ checkpointingItems.push({
+ title: 'next.checkpoint_progress.docs_remaining',
+ description: item.stats.checkpointing.next.checkpoint_progress.docs_remaining,
+ });
+ checkpointingItems.push({
+ title: 'next.checkpoint_progress.percent_complete',
+ description: item.stats.checkpointing.next.checkpoint_progress.percent_complete,
+ });
+ }
+ }
+
const checkpointing: SectionConfig = {
title: 'Checkpointing',
- items: Object.entries(item.checkpointing).map(s => {
- return { title: s[0].toString(), description: getItemDescription(s[1]) };
- }),
+ items: checkpointingItems,
position: 'left',
};
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/transform_list.tsx b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/transform_list.tsx
index 30e021257dd3..d95c48edbe38 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/transform_list.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/components/transform_list/transform_list.tsx
@@ -22,7 +22,7 @@ import {
DataFrameTransformListColumn,
DataFrameTransformListRow,
ItemIdToExpandedRowMap,
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
DATA_FRAME_MODE,
Query,
Clause,
@@ -152,7 +152,7 @@ export const DataFrameTransformList: SFC = () => {
// filter other clauses, i.e. the mode and status filters
if (Array.isArray(c.value)) {
// the status value is an array of string(s) e.g. ['failed', 'stopped']
- ts = transforms.filter(transform => c.value.includes(transform.stats.task_state));
+ ts = transforms.filter(transform => c.value.includes(transform.stats.state));
} else {
ts = transforms.filter(transform => transform.mode === c.value);
}
@@ -245,10 +245,10 @@ export const DataFrameTransformList: SFC = () => {
filters: [
{
type: 'field_value_selection',
- field: 'state.task_state',
+ field: 'state.state',
name: i18n.translate('xpack.ml.dataframe.statusFilter', { defaultMessage: 'Status' }),
multiSelect: 'or',
- options: Object.values(DATA_FRAME_TASK_STATE).map(val => ({
+ options: Object.values(DATA_FRAME_TRANSFORM_STATE).map(val => ({
value: val,
name: val,
view: getTaskStateBadge(val),
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/delete_transform.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/delete_transform.ts
index ad563a6e40ba..307f32e69afe 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/delete_transform.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/delete_transform.ts
@@ -11,18 +11,14 @@ import { ml } from '../../../../../services/ml_api_service';
import { refreshTransformList$, REFRESH_TRANSFORM_LIST_STATE } from '../../../../common';
import {
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
DataFrameTransformListRow,
} from '../../components/transform_list/common';
export const deleteTransform = async (d: DataFrameTransformListRow) => {
try {
- if (d.stats.task_state === DATA_FRAME_TASK_STATE.FAILED) {
- await ml.dataFrame.stopDataFrameTransform(
- d.config.id,
- d.stats.task_state === DATA_FRAME_TASK_STATE.FAILED,
- true
- );
+ if (d.stats.state === DATA_FRAME_TRANSFORM_STATE.FAILED) {
+ await ml.dataFrame.stopDataFrameTransform(d.config.id, true, true);
}
await ml.dataFrame.deleteDataFrameTransform(d.config.id);
toastNotifications.addSuccess(
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/get_transforms.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/get_transforms.ts
index 51aa36512556..e6245d148e7d 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/get_transforms.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/get_transforms.ts
@@ -89,7 +89,6 @@ export const getTransformsFactory = (
// Table with expandable rows requires `id` on the outer most level
reducedtableRows.push({
id: config.id,
- checkpointing: stats.checkpointing,
config,
mode:
typeof config.sync !== 'undefined'
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/start_transform.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/start_transform.ts
index 0e1f7562143c..b96ecfb82bc1 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/start_transform.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/start_transform.ts
@@ -11,7 +11,7 @@ import { ml } from '../../../../../services/ml_api_service';
import { refreshTransformList$, REFRESH_TRANSFORM_LIST_STATE } from '../../../../common';
import {
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
DataFrameTransformListRow,
} from '../../components/transform_list/common';
@@ -19,7 +19,7 @@ export const startTransform = async (d: DataFrameTransformListRow) => {
try {
await ml.dataFrame.startDataFrameTransform(
d.config.id,
- d.stats.task_state === DATA_FRAME_TASK_STATE.FAILED
+ d.stats.state === DATA_FRAME_TRANSFORM_STATE.FAILED
);
toastNotifications.addSuccess(
i18n.translate('xpack.ml.dataframe.transformList.startTransformSuccessMessage', {
diff --git a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/stop_transform.ts b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/stop_transform.ts
index 61550291255c..63a68f6c3e40 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/stop_transform.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame/pages/transform_management/services/transform_service/stop_transform.ts
@@ -11,7 +11,7 @@ import { ml } from '../../../../../services/ml_api_service';
import { refreshTransformList$, REFRESH_TRANSFORM_LIST_STATE } from '../../../../common';
import {
- DATA_FRAME_TASK_STATE,
+ DATA_FRAME_TRANSFORM_STATE,
DataFrameTransformListRow,
} from '../../components/transform_list/common';
@@ -19,7 +19,7 @@ export const stopTransform = async (d: DataFrameTransformListRow) => {
try {
await ml.dataFrame.stopDataFrameTransform(
d.config.id,
- d.stats.task_state === DATA_FRAME_TASK_STATE.FAILED,
+ d.stats.state === DATA_FRAME_TRANSFORM_STATE.FAILED,
true
);
toastNotifications.addSuccess(