Skip to content
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 @@ -174,18 +174,6 @@ describe('DocViewTable at Discover', () => {
});
}
});

(['noMappingWarning'] as const).forEach((element) => {
const elementExist = check[element];

if (typeof elementExist === 'boolean') {
const el = findTestSubject(rowComponent, element);

it(`renders ${element} for '${check._property}' correctly`, () => {
expect(el.length).toBe(elementExist ? 1 : 0);
});
}
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React, { useState } from 'react';
import { escapeRegExp } from 'lodash';
import { DocViewTableRow } from './table_row';
import { arrayContainsObjects, trimAngularSpan } from './table_helper';
import { trimAngularSpan } from './table_helper';
import { DocViewRenderProps } from '../../doc_views/doc_views_types';

const COLLAPSE_LINE_LENGTH = 350;
Expand Down Expand Up @@ -72,11 +72,7 @@ export function DocViewTable({
}
}
: undefined;
const isArrayOfObjects =
Array.isArray(flattened[field]) && arrayContainsObjects(flattened[field]);
const displayUnderscoreWarning = !mapping(field) && field.indexOf('_') === 0;
const displayNoMappingWarning =
!mapping(field) && !displayUnderscoreWarning && !isArrayOfObjects;

// Discover doesn't flatten arrays of objects, so for documents with an `object` or `nested` field that
// contains an array, Discover will only detect the top level root field. We want to detect when those
Expand Down Expand Up @@ -128,7 +124,6 @@ export function DocViewTable({
fieldMapping={mapping(field)}
fieldType={String(fieldType)}
displayUnderscoreWarning={displayUnderscoreWarning}
displayNoMappingWarning={displayNoMappingWarning}
isCollapsed={isCollapsed}
isCollapsible={isCollapsible}
isColumnActive={Array.isArray(columns) && columns.includes(field)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ import { DocViewTableRowBtnFilterRemove } from './table_row_btn_filter_remove';
import { DocViewTableRowBtnToggleColumn } from './table_row_btn_toggle_column';
import { DocViewTableRowBtnCollapse } from './table_row_btn_collapse';
import { DocViewTableRowBtnFilterExists } from './table_row_btn_filter_exists';
import { DocViewTableRowIconNoMapping } from './table_row_icon_no_mapping';
import { DocViewTableRowIconUnderscore } from './table_row_icon_underscore';
import { FieldName } from '../field_name/field_name';

export interface Props {
field: string;
fieldMapping?: FieldMapping;
fieldType: string;
displayNoMappingWarning: boolean;
displayUnderscoreWarning: boolean;
isCollapsible: boolean;
isColumnActive: boolean;
Expand All @@ -48,7 +46,6 @@ export function DocViewTableRow({
field,
fieldMapping,
fieldType,
displayNoMappingWarning,
displayUnderscoreWarning,
isCollapsible,
isCollapsed,
Expand Down Expand Up @@ -80,7 +77,6 @@ export function DocViewTableRow({
<DocViewTableRowBtnCollapse onClick={onToggleCollapse} isCollapsed={isCollapsed} />
)}
{displayUnderscoreWarning && <DocViewTableRowIconUnderscore />}
{displayNoMappingWarning && <DocViewTableRowIconNoMapping />}
<div
className={valueClassName}
data-test-subj={`tableDocViewRow-${field}-value`}
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1459,8 +1459,6 @@
"discover.docViews.table.filterForValueButtonTooltip": "値でフィルター",
"discover.docViews.table.filterOutValueButtonAriaLabel": "値を除外",
"discover.docViews.table.filterOutValueButtonTooltip": "値を除外",
"discover.docViews.table.noCachedMappingForThisFieldAriaLabel": "警告",
"discover.docViews.table.noCachedMappingForThisFieldTooltip": "このフィールドのキャッシュされたマッピングがありません。管理 > インデックスパターンページからフィールドリストを更新してください",
"discover.docViews.table.tableTitle": "表",
"discover.docViews.table.toggleColumnInTableButtonAriaLabel": "表の列を切り替える",
"discover.docViews.table.toggleColumnInTableButtonTooltip": "表の列を切り替える",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1460,8 +1460,6 @@
"discover.docViews.table.filterForValueButtonTooltip": "筛留值",
"discover.docViews.table.filterOutValueButtonAriaLabel": "筛除值",
"discover.docViews.table.filterOutValueButtonTooltip": "筛除值",
"discover.docViews.table.noCachedMappingForThisFieldAriaLabel": "警告",
"discover.docViews.table.noCachedMappingForThisFieldTooltip": "此字段没有任何已缓存映射。从“管理”>“索引模式”页面刷新字段列表",
"discover.docViews.table.tableTitle": "表",
"discover.docViews.table.toggleColumnInTableButtonAriaLabel": "在表中切换列",
"discover.docViews.table.toggleColumnInTableButtonTooltip": "在表中切换列",
Expand Down