From 514fbd7b9859fb85e201edbaa06515a54e3ea697 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sat, 11 Apr 2020 08:41:55 -0500 Subject: [PATCH] update snapshot --- .../__snapshots__/indexed_fields_table.test.js.snap | 5 ----- src/legacy/ui/public/field_editor/field_editor.js | 11 ++++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap index dc77fe6c8a69d6..b38036a0c2bf0f 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap @@ -18,7 +18,6 @@ exports[`IndexedFieldsTable should filter based on the query bar 1`] = ` "indexPattern": undefined, "info": undefined, "name": "Elastic", - "routes": undefined, "searchable": true, }, ] @@ -45,7 +44,6 @@ exports[`IndexedFieldsTable should filter based on the type filter 1`] = ` "indexPattern": undefined, "info": undefined, "name": "timestamp", - "routes": undefined, "type": "date", }, ] @@ -72,7 +70,6 @@ exports[`IndexedFieldsTable should render normally 1`] = ` "indexPattern": undefined, "info": undefined, "name": "Elastic", - "routes": undefined, "searchable": true, }, Object { @@ -82,7 +79,6 @@ exports[`IndexedFieldsTable should render normally 1`] = ` "indexPattern": undefined, "info": undefined, "name": "timestamp", - "routes": undefined, "type": "date", }, Object { @@ -92,7 +88,6 @@ exports[`IndexedFieldsTable should render normally 1`] = ` "indexPattern": undefined, "info": undefined, "name": "conflictingField", - "routes": undefined, "type": "conflict", }, ] diff --git a/src/legacy/ui/public/field_editor/field_editor.js b/src/legacy/ui/public/field_editor/field_editor.js index ceb232a32770a0..4ae1333cad510f 100644 --- a/src/legacy/ui/public/field_editor/field_editor.js +++ b/src/legacy/ui/public/field_editor/field_editor.js @@ -66,7 +66,9 @@ import { ScriptingHelpFlyout } from './components/scripting_help'; import { FieldFormatEditor } from './components/field_format_editor'; import { FIELD_TYPES_BY_LANG, DEFAULT_FIELD_TYPES } from './constants'; -import { copyField, executeScript, isScriptValid } from './lib'; +import { executeScript, isScriptValid } from './lib'; +//import { copyField, executeScript, isScriptValid } from './lib'; +// import { Field } from '../../../../plugins/data/public'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -112,8 +114,6 @@ export class FieldEditor extends PureComponent { const { field, indexPattern } = props; - // console.log('field_editors', Field); - this.state = { isReady: false, isCreating: false, @@ -122,8 +122,9 @@ export class FieldEditor extends PureComponent { fieldTypes: [], fieldTypeFormats: [], existingFieldNames: indexPattern.fields.map(f => f.name), - field: copyField(field, indexPattern), - // field: new Field(indexPattern, field), // what about short dots? + // field: copyField(field, indexPattern), + //field: new Field(indexPattern, field.$$spec), // what about short dots? + field: { ...field.$$spec }, fieldFormatId: undefined, fieldFormatParams: {}, showScriptingHelp: false,