Skip to content

Commit

Permalink
Fix DV -> lens broken due to records field migration
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Feb 2, 2022
1 parent bfbb4a9 commit 248cba5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion x-pack/plugins/data_visualizer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"esUiShared",
"fieldFormats",
"uiActions",
"cloud"
"cloud",
"lens"
],
"owner": {
"name": "Machine Learning UI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
} from '../../../../../../../lens/public';
import { FieldVisConfig } from '../../stats_table/types';
import { JOB_FIELD_TYPES } from '../../../../../../common/constants';
import { DOCUMENT_FIELD_NAME } from '../../../../../../../lens/common/constants';

interface ColumnsAndLayer {
columns: Record<string, GenericIndexPatternColumn>;
Expand Down Expand Up @@ -52,7 +53,7 @@ export function getNumberSettings(item: FieldVisConfig, defaultIndexPattern: Ind
label: COUNT,
dataType: 'number',
isBucketed: false,
sourceField: 'Records',
sourceField: DOCUMENT_FIELD_NAME,
operationType: 'count',
},
};
Expand Down Expand Up @@ -107,7 +108,7 @@ export function getDateSettings(item: FieldVisConfig) {
label: COUNT,
operationType: 'count',
scale: 'ratio',
sourceField: 'Records',
sourceField: DOCUMENT_FIELD_NAME,
},
col1: {
dataType: 'date',
Expand Down Expand Up @@ -148,7 +149,7 @@ export function getKeywordSettings(item: FieldVisConfig) {
label: COUNT,
dataType: 'number',
isBucketed: false,
sourceField: 'Records',
sourceField: DOCUMENT_FIELD_NAME,
operationType: 'count',
},
};
Expand Down Expand Up @@ -181,7 +182,7 @@ export function getBooleanSettings(item: FieldVisConfig) {
label: COUNT,
dataType: 'number',
isBucketed: false,
sourceField: 'Records',
sourceField: DOCUMENT_FIELD_NAME,
operationType: 'count',
},
};
Expand Down

0 comments on commit 248cba5

Please sign in to comment.