Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
c7a35e6
[ML] Initial embed
qn895 Jul 19, 2021
5b48b41
[ML] Initial embed props
qn895 Jul 20, 2021
a080199
[ML] Add top nav link to data viz
qn895 Jul 20, 2021
c570d42
Add visible fields
qn895 Jul 21, 2021
b2dd8cb
Add add data service to register links
qn895 Jul 22, 2021
28d54d0
Renames, refactor, use constants
qn895 Jul 22, 2021
4128150
Renames, refactor, use constants
qn895 Jul 22, 2021
9fbffbf
Update tests and mocks
qn895 Jul 25, 2021
71833e0
Merge remote-tracking branch 'upstream/master' into ml-dv-in-discover
qn895 Jul 26, 2021
eaa2563
Embeddable
qn895 Jul 26, 2021
df58def
Update hook to update upon time udpate
qn895 Jul 26, 2021
66760b0
Merge remote-tracking branch 'upstream/master' into ml-dv-link-from-d…
qn895 Jul 27, 2021
e9e18b7
Add filter support to query
qn895 Jul 27, 2021
60aaa39
Refactor filter utilities
qn895 Jul 27, 2021
95ee436
Merge in embeddable
qn895 Jul 27, 2021
e65edcf
Add filter support for embeddable
qn895 Jul 27, 2021
19eaa69
Fix saved search data undefined
qn895 Jul 27, 2021
9215bcc
Prototype aggregated view/document view switcher
qn895 Jul 27, 2021
76f9ad6
Prototype flyout
qn895 Jul 27, 2021
0e4bacb
Prototype save document view option in storage
qn895 Jul 27, 2021
c40ec0a
Fix filter and query conflict with saved search
qn895 Jul 28, 2021
8f88ffd
Minor styling edits
qn895 Jul 28, 2021
cd4baee
[ML] Initial embed
qn895 Jul 19, 2021
dedbbec
[ML] Initial embed props
qn895 Jul 20, 2021
f5a563f
Add embeddable 1
qn895 Jul 20, 2021
215a983
Add visible fields
qn895 Jul 21, 2021
e76781c
Embeddable 2
qn895 Jul 22, 2021
eb827fa
Add filter support to query
qn895 Jul 27, 2021
b39328d
Refactor filter utilities
qn895 Jul 27, 2021
51b43bd
Add filter support for embeddable
qn895 Jul 27, 2021
41030b3
Fix saved search data undefined
qn895 Jul 27, 2021
7f26d96
Prototype aggregated view/document view switcher
qn895 Jul 27, 2021
ad49939
Prototype flyout
qn895 Jul 27, 2021
25ac180
Prototype save document view option in storage
qn895 Jul 27, 2021
534c70b
Fix filter and query conflict with saved search
qn895 Jul 28, 2021
c09314e
Minor styling edits
qn895 Jul 28, 2021
3581df1
Fix missing code after conflicts
qn895 Jul 29, 2021
a9169d7
Remove dv locator and flyout
qn895 Jul 29, 2021
545221b
Make types happy
qn895 Jul 29, 2021
5fe3c5f
Fix types
qn895 Jul 29, 2021
212869a
Rename toggle option
qn895 Jul 29, 2021
cb3f492
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Jul 30, 2021
e7a2b5c
Merge upstream/main into branch
qn895 Aug 6, 2021
eaccec9
Resolve conflicts
qn895 Aug 6, 2021
2489ebd
Merge upstream/main into branch
qn895 Aug 31, 2021
d5c9378
Merge upstream/main into branch
qn895 Aug 31, 2021
2a234fc
[ML] Reduce size of chart
qn895 Aug 31, 2021
f5b44e0
[ML] Unbold name, switch icons of show distributions
qn895 Aug 31, 2021
d1e35d9
[ML] Make size consistent
qn895 Aug 31, 2021
a366559
[ML] Make page size 25
qn895 Aug 31, 2021
e843dcd
[ML] Switch to arrow right and down
qn895 Sep 1, 2021
2e69576
[ML] Make legend font smaller
qn895 Sep 1, 2021
cc6ea0b
[ML] Add user setting
qn895 Sep 1, 2021
42c1105
[ML] Add show preview by default setting
qn895 Sep 1, 2021
680259a
[ML] Match icon
qn895 Sep 1, 2021
42af191
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 2, 2021
578f49c
Add panels around the subcontent
qn895 Sep 3, 2021
5e5d13a
Add preference for aggregated vs doc
qn895 Sep 7, 2021
f353324
Fix types
qn895 Sep 7, 2021
ce47830
Merge upstream/main into branch
qn895 Sep 7, 2021
222ea5a
Fix types, add constants for adv settings
qn895 Sep 8, 2021
8d6d358
Change to data view type
qn895 Sep 8, 2021
c81a056
Temp fix for Kibana/EUI table overflow issue
qn895 Sep 8, 2021
abd8d1e
Modify line height so text is not cut off, modify widths for varying …
qn895 Sep 8, 2021
fda1711
Different width padders for different screens
qn895 Sep 8, 2021
a0e457f
Fix CI
qn895 Sep 8, 2021
3bb9c66
Fix CI
qn895 Sep 8, 2021
d23b9c4
Merge latest, move button to the right
qn895 Sep 8, 2021
96d112f
Fix width for bar charts previews
qn895 Sep 9, 2021
d36b30c
Fix toggle buttons, fix maps
qn895 Sep 9, 2021
b67f1ba
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 9, 2021
76aed63
Delete unused file
qn895 Sep 9, 2021
6a7b1ba
Fix boolean styling
qn895 Sep 13, 2021
f12711a
Change to enum, discover mode
qn895 Sep 13, 2021
b0f7d16
Hide field stats
qn895 Sep 13, 2021
bed2cd6
Hide field stats
qn895 Sep 13, 2021
f29765b
Persist show mini preview/distribution settings
qn895 Sep 13, 2021
d0d2289
Remove window size, use size observer instead
qn895 Sep 13, 2021
eb9683c
Default to document view
qn895 Sep 13, 2021
92f18bd
Remove bold, switch icon
qn895 Sep 13, 2021
d810f94
Set fixed width for top values, reduce font size in table
qn895 Sep 13, 2021
db97adf
Fix custom url tests
qn895 Sep 13, 2021
a347d83
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 13, 2021
9d52065
Update width styling for panels
qn895 Sep 13, 2021
b3bb224
Fix missing flag for Discover sidebar, jest tests
qn895 Sep 14, 2021
006aead
Fix max width
qn895 Sep 14, 2021
ae2c0c3
Workaround for sorting
qn895 Sep 14, 2021
45da099
Merge upstream/main into branch
qn895 Sep 15, 2021
3ac2293
Fix import
qn895 Sep 15, 2021
ed496bf
Fix styling
qn895 Sep 15, 2021
8fc42e2
Make height uniform, center alignment, fix map and keyword map not sa…
qn895 Sep 16, 2021
cd0e898
Revert "Make height uniform, center alignment, fix map and keyword ma…
qn895 Sep 16, 2021
cad924a
Revert "Make height uniform, center alignment, fix map and keyword ma…
qn895 Sep 16, 2021
84c4e64
Uniform height, left aligned, flex grid
qn895 Sep 16, 2021
70c3f9d
Switch top values to have labels
qn895 Sep 16, 2021
3acf891
Center content
qn895 Sep 16, 2021
1c7d4b8
Replace fixed widths with percentage
qn895 Sep 16, 2021
3517608
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 16, 2021
6eceb57
Fix table missing field types
qn895 Sep 16, 2021
b8a31ea
Add dashboard embeddable and filter support
qn895 Sep 16, 2021
90c8259
Fix file data viz styling and tests, lean up imports, remove hard cod…
qn895 Sep 16, 2021
a9db750
Add search panel/kql filter bar
qn895 Sep 17, 2021
b743a96
Temporarily fix scrolling
qn895 Sep 20, 2021
3459f02
New kql filters for data visualizer
qn895 Sep 20, 2021
ed1d4e5
Set map height so it will fit the sampler shard size text
qn895 Sep 20, 2021
22a35c0
Use eui progress labels
qn895 Sep 20, 2021
88e2e51
Merge upstream/main into branch
qn895 Sep 20, 2021
71df070
Fix spacer
qn895 Sep 20, 2021
c16cb8f
Add beta badge
qn895 Sep 20, 2021
52b8ab8
Temporarily fix scrolling
qn895 Sep 20, 2021
00c3499
Fix grow for Top Values for
qn895 Sep 21, 2021
f65f5a6
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 21, 2021
d1f0251
Fix top values getting cut off
qn895 Sep 21, 2021
a75b11f
[ML] Redesign DV with panels, resize widths responsively, add filter …
qn895 Sep 22, 2021
22389df
[ML] Update functional tests to reflect new arrow icons
qn895 Sep 22, 2021
cd9f681
[ML] Add filter buttons and KQL bars
qn895 Sep 22, 2021
5bfb9e2
[ML] Update filter bar onChange behavior
qn895 Sep 22, 2021
16298ab
[ML] Update top values filter onChange behavior
qn895 Sep 22, 2021
0a412da
[ML] Update search filters when opening saved search
qn895 Sep 22, 2021
a956d89
[ML] Clean up
qn895 Sep 22, 2021
cf25f85
[ML] Remove fit content for height
qn895 Sep 22, 2021
f78c0e0
[ML] Fix boolean legend
qn895 Sep 22, 2021
436d849
[ML] Fix header section when browser width is small to large and when…
qn895 Sep 22, 2021
1e0ebb5
[ML] Hide expander icon when dimension is xs or s & css fixes
qn895 Sep 22, 2021
06c2d40
[ML] Delete embeddables because they are not use
qn895 Sep 22, 2021
67811eb
Merge remote-tracking branch 'upstream/master' into ml-dv-redesign
qn895 Sep 22, 2021
ba1cad7
[ML] Rename view mode, refactor to separate hook, add error prompt if…
qn895 Sep 22, 2021
f0964c0
Merge remote-tracking branch 'upstream/master' into ml-dv-redesign
qn895 Sep 23, 2021
fc32cd9
[ML] Make doc count 0 for empty fields, update t/f test
qn895 Sep 23, 2021
6c91692
[ML] Add unit testing for search utils
qn895 Sep 23, 2021
d7ddcf3
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 23, 2021
4188620
Merge design responsive changes from 112870
qn895 Sep 23, 2021
5f2a228
Fix missing unsubscribe for embeddable output
qn895 Sep 23, 2021
747aa40
Remove redundant onAddFilter for this PR, fix width
qn895 Sep 23, 2021
110eeef
Rename Field Stats to Field stats to match convention
qn895 Sep 23, 2021
af5b98a
[ML] Fix expand all/collapse all behavior to override individual setting
qn895 Sep 23, 2021
fb9ec32
[ML] Fix functional tests should be 0/0%
qn895 Sep 23, 2021
024a2a7
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 24, 2021
f4a51d6
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Sep 27, 2021
0fd5389
Merge upstream/main into branch
qn895 Sep 28, 2021
c591dc2
[ML] Fix docs content spacing, rename classnames, add filters to Disc…
qn895 Sep 28, 2021
58e68b9
[ML] Fix doc count for fields that exists but have no stats
qn895 Sep 28, 2021
e92dc2a
[ML] Fix icon styling to match Discover but have text/keyword/histogram
qn895 Sep 28, 2021
b9c981f
[ML] Fix doc count for fields that exists but have no stats
qn895 Sep 28, 2021
4645ff3
[ML] Rename classnames to BEM style
qn895 Sep 28, 2021
35bdf50
Merge upstream/main into branch
qn895 Sep 30, 2021
6835aee
Resolve latest changes
qn895 Sep 30, 2021
9f52584
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Oct 4, 2021
c52f948
Merge upstream/main into branch
qn895 Oct 6, 2021
e3ea604
Merge branch 'master' into ml-discover-embeddable-integration
kibanamachine Oct 11, 2021
570972d
[ML] Add tests for data viz in Discover
qn895 Oct 8, 2021
fe9cd16
Update tests & dashboard behavior to reflect new advanced settings
qn895 Oct 11, 2021
e60b1d5
Merge remote-tracking branch 'upstream/master' into ml-discover-embed…
qn895 Oct 11, 2021
cad14c2
Update telemetry
qn895 Oct 11, 2021
122c6ca
Remove workaround after eui bump fix
qn895 Oct 11, 2021
932e27c
Merge branch 'master' into ml-discover-embeddable-integration
kibanamachine Oct 12, 2021
99fc665
Fix missing bool clause
qn895 Oct 13, 2021
152b637
Merge upstream/main into branch
qn895 Oct 13, 2021
f9f89ad
Add login
qn895 Oct 13, 2021
b3ab9fa
Fix saved search attributes broken with latest changes
qn895 Oct 13, 2021
bec05dc
Merge upstream/main into branch
qn895 Oct 14, 2021
d70cfd3
Update tests
qn895 Oct 14, 2021
5024aa9
Merge upstream/main into branch
qn895 Oct 14, 2021
75486b7
Fix import
qn895 Oct 14, 2021
d704232
Match the no results found
qn895 Oct 14, 2021
29ddc82
Merge upstream/main into branch
qn895 Oct 19, 2021
b63dd07
Fix query util to return search source's results right away. Fix texts.
qn895 Oct 19, 2021
57f242f
Merge branch 'master' into ml-discover-embeddable-integration
kibanamachine Oct 20, 2021
90f12d7
Merge branch 'master' into ml-discover-embeddable-integration
kibanamachine Oct 20, 2021
c74bd44
Merge branch 'master' into ml-discover-embeddable-integration
kibanamachine Oct 20, 2021
f4e9347
Merge upstream/main into branch
qn895 Oct 21, 2021
0828e6c
Rename old test suits to farequoteDataViewTestData
qn895 Oct 21, 2021
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
1 change: 1 addition & 0 deletions src/plugins/discover/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export const DOC_TABLE_LEGACY = 'doc_table:legacy';
export const MODIFY_COLUMNS_ON_SWITCH = 'discover:modifyColumnsOnSwitch';
export const SEARCH_FIELDS_FROM_SOURCE = 'discover:searchFieldsFromSource';
export const MAX_DOC_FIELDS_DISPLAYED = 'discover:maxDocFieldsDisplayed';
export const SHOW_FIELD_STATISTICS = 'discover:showFieldStatistics';
export const SHOW_MULTIFIELDS = 'discover:showMultiFields';
export const SEARCH_EMBEDDABLE_TYPE = 'search';
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { discoverServiceMock } from '../../../../../__mocks__/services';
import { FetchStatus } from '../../../../types';
import { Chart } from './point_series';
import { DiscoverChart } from './discover_chart';
import { VIEW_MODE } from '../view_mode_toggle';

setHeaderActionMenuMounter(jest.fn());

Expand Down Expand Up @@ -94,6 +95,8 @@ function getProps(timefield?: string) {
state: { columns: [] },
stateContainer: {} as GetStateReturn,
timefield,
viewMode: VIEW_MODE.DOCUMENT_LEVEL,
setDiscoverViewMode: jest.fn(),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { DiscoverHistogram } from './histogram';
import { DataCharts$, DataTotalHits$ } from '../../services/use_saved_search';
import { DiscoverServices } from '../../../../../build_services';
import { useChartPanels } from './use_chart_panels';
import { VIEW_MODE, DocumentViewModeToggle } from '../view_mode_toggle';
import { SHOW_FIELD_STATISTICS } from '../../../../../../common';

const DiscoverHistogramMemoized = memo(DiscoverHistogram);
export const CHART_HIDDEN_KEY = 'discover:chartHidden';
Expand All @@ -36,6 +38,8 @@ export function DiscoverChart({
state,
stateContainer,
timefield,
viewMode,
setDiscoverViewMode,
}: {
resetSavedSearch: () => void;
savedSearch: SavedSearch;
Expand All @@ -45,8 +49,11 @@ export function DiscoverChart({
state: AppState;
stateContainer: GetStateReturn;
timefield?: string;
viewMode: VIEW_MODE;
setDiscoverViewMode: (viewMode: VIEW_MODE) => void;
}) {
const [showChartOptionsPopover, setShowChartOptionsPopover] = useState(false);
const showViewModeToggle = services.uiSettings.get(SHOW_FIELD_STATISTICS) ?? false;

const { data, storage } = services;

Expand Down Expand Up @@ -108,6 +115,16 @@ export function DiscoverChart({
onResetQuery={resetSavedSearch}
/>
</EuiFlexItem>

{showViewModeToggle && (
<EuiFlexItem grow={false}>
<DocumentViewModeToggle
viewMode={viewMode}
setDiscoverViewMode={setDiscoverViewMode}
/>
</EuiFlexItem>
)}

{timefield && (
<EuiFlexItem className="dscResultCount__toggle" grow={false}>
<EuiPopover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ discover-app {
flex-grow: 1;
}

.dscAppWrapper {
overflow-y: hidden;
}

.dscPage {
@include euiBreakpoint('m', 'l', 'xl') {
@include kibanaFullBodyHeight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
* Side Public License, v 1.
*/
import './discover_layout.scss';
import React, { useState, useMemo, useCallback, useEffect, useRef } from 'react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import {
EuiSpacer,
EuiButtonIcon,
EuiFlexGroup,
EuiFlexItem,
Expand All @@ -17,6 +16,7 @@ import {
EuiPage,
EuiPageBody,
EuiPageContent,
EuiSpacer,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { METRIC_TYPE } from '@kbn/analytics';
Expand All @@ -26,7 +26,7 @@ import { LoadingSpinner } from '../loading_spinner/loading_spinner';
import { esFilters, IndexPatternField } from '../../../../../../../data/public';
import { DiscoverSidebarResponsive } from '../sidebar';
import { DiscoverLayoutProps } from './types';
import { SEARCH_FIELDS_FROM_SOURCE } from '../../../../../../common';
import { SEARCH_FIELDS_FROM_SOURCE, SHOW_FIELD_STATISTICS } from '../../../../../../common';
import { popularizeField } from '../../../../helpers/popularize_field';
import { DiscoverTopNav } from '../top_nav/discover_topnav';
import { DocViewFilterFn, ElasticSearchHit } from '../../../../doc_views/doc_views_types';
Expand All @@ -43,6 +43,8 @@ import {
SavedSearchURLConflictCallout,
useSavedSearchAliasMatchRedirect,
} from '../../../../../saved_searches';
import { DiscoverDataVisualizerGrid } from '../../../../components/data_visualizer_grid';
import { VIEW_MODE } from '../view_mode_toggle';

/**
* Local storage key for sidebar persistence state
Expand All @@ -52,6 +54,7 @@ export const SIDEBAR_CLOSED_KEY = 'discover:sidebarClosed';
const SidebarMemoized = React.memo(DiscoverSidebarResponsive);
const TopNavMemoized = React.memo(DiscoverTopNav);
const DiscoverChartMemoized = React.memo(DiscoverChart);
const DataVisualizerGridMemoized = React.memo(DiscoverDataVisualizerGrid);

export function DiscoverLayout({
indexPattern,
Expand Down Expand Up @@ -83,6 +86,19 @@ export function DiscoverLayout({
const { main$, charts$, totalHits$ } = savedSearchData$;
const [expandedDoc, setExpandedDoc] = useState<ElasticSearchHit | undefined>(undefined);
const [inspectorSession, setInspectorSession] = useState<InspectorSession | undefined>(undefined);

const viewMode = useMemo(() => {
if (uiSettings.get(SHOW_FIELD_STATISTICS) !== true) return VIEW_MODE.DOCUMENT_LEVEL;
return state.viewMode ?? VIEW_MODE.DOCUMENT_LEVEL;
}, [uiSettings, state.viewMode]);

const setDiscoverViewMode = useCallback(
(mode: VIEW_MODE) => {
stateContainer.setAppState({ viewMode: mode });
},
[stateContainer]
);

const fetchCounter = useRef<number>(0);
const dataState: DataMainMsg = useDataState(main$);

Expand Down Expand Up @@ -213,6 +229,7 @@ export function DiscoverLayout({
trackUiMetric={trackUiMetric}
useNewFieldsApi={useNewFieldsApi}
onEditRuntimeField={onEditRuntimeField}
viewMode={viewMode}
/>
</EuiFlexItem>
<EuiHideFor sizes={['xs', 's']}>
Expand Down Expand Up @@ -279,22 +296,36 @@ export function DiscoverLayout({
services={services}
stateContainer={stateContainer}
timefield={timeField}
viewMode={viewMode}
setDiscoverViewMode={setDiscoverViewMode}
/>
</EuiFlexItem>
<EuiHorizontalRule margin="none" />

<DiscoverDocuments
documents$={savedSearchData$.documents$}
expandedDoc={expandedDoc}
indexPattern={indexPattern}
navigateTo={navigateTo}
onAddFilter={onAddFilter as DocViewFilterFn}
savedSearch={savedSearch}
services={services}
setExpandedDoc={setExpandedDoc}
state={state}
stateContainer={stateContainer}
/>
{viewMode === VIEW_MODE.DOCUMENT_LEVEL ? (
<DiscoverDocuments
documents$={savedSearchData$.documents$}
expandedDoc={expandedDoc}
indexPattern={indexPattern}
navigateTo={navigateTo}
onAddFilter={onAddFilter as DocViewFilterFn}
savedSearch={savedSearch}
services={services}
setExpandedDoc={setExpandedDoc}
state={state}
stateContainer={stateContainer}
/>
) : (
<DataVisualizerGridMemoized
savedSearch={savedSearch}
services={services}
indexPattern={indexPattern}
query={state.query}
filters={state.filters}
columns={columns}
stateContainer={stateContainer}
onAddFilter={onAddFilter}
/>
)}
</EuiFlexGroup>
)}
</EuiPageContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiSpacer,
EuiHorizontalRule,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { UiCounterMetricType } from '@kbn/analytics';
Expand Down Expand Up @@ -251,6 +252,11 @@ export interface DiscoverFieldProps {
* @param fieldName name of the field to delete
*/
onDeleteField?: (fieldName: string) => void;

/**
* Optionally show or hide field stats in the popover
*/
showFieldStats?: boolean;
}

function DiscoverFieldComponent({
Expand All @@ -266,6 +272,7 @@ function DiscoverFieldComponent({
multiFields,
onEditField,
onDeleteField,
showFieldStats,
}: DiscoverFieldProps) {
const [infoIsOpen, setOpen] = useState(false);

Expand Down Expand Up @@ -362,22 +369,35 @@ function DiscoverFieldComponent({
const details = getDetails(field);
return (
<>
<DiscoverFieldDetails
indexPattern={indexPattern}
field={field}
details={details}
onAddFilter={onAddFilter}
/>
{showFieldStats && (
<>
<EuiTitle size="xxxs">
<h5>
{i18n.translate('discover.fieldChooser.discoverField.fieldTopValuesLabel', {
defaultMessage: 'Top 5 values',
})}
</h5>
</EuiTitle>
<DiscoverFieldDetails
indexPattern={indexPattern}
field={field}
details={details}
onAddFilter={onAddFilter}
/>
</>
)}

{multiFields && (
<>
<EuiSpacer size="m" />
{showFieldStats && <EuiSpacer size="m" />}
<MultiFields
multiFields={multiFields}
alwaysShowActionButton={alwaysShowActionButton}
toggleDisplay={toggleDisplay}
/>
</>
)}
{(showFieldStats || multiFields) && <EuiHorizontalRule margin="m" />}
<DiscoverFieldVisualize
field={field}
indexPattern={indexPattern}
Expand All @@ -388,7 +408,6 @@ function DiscoverFieldComponent({
</>
);
};

return (
<EuiPopover
display="block"
Expand Down Expand Up @@ -418,13 +437,6 @@ function DiscoverFieldComponent({
panelClassName="dscSidebarItem__fieldPopoverPanel"
>
{popoverTitle}
<EuiTitle size="xxxs">
<h5>
{i18n.translate('discover.fieldChooser.discoverField.fieldTopValuesLabel', {
defaultMessage: 'Top 5 values',
})}
</h5>
</EuiTitle>
{infoIsOpen && renderPopover()}
</EuiPopover>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import React, { useEffect, useState } from 'react';
import { EuiButton, EuiPopoverFooter } from '@elastic/eui';
import { EuiButton } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { METRIC_TYPE, UiCounterMetricType } from '@kbn/analytics';
import type { IndexPattern, IndexPatternField } from 'src/plugins/data/common';
Expand Down Expand Up @@ -46,21 +46,19 @@ export const DiscoverFieldVisualize: React.FC<Props> = React.memo(
};

return (
<EuiPopoverFooter>
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
<EuiButton
fullWidth
size="s"
href={visualizeInfo.href}
onClick={handleVisualizeLinkClick}
data-test-subj={`fieldVisualize-${field.name}`}
>
<FormattedMessage
id="discover.fieldChooser.visualizeButton.label"
defaultMessage="Visualize"
/>
</EuiButton>
</EuiPopoverFooter>
// eslint-disable-next-line @elastic/eui/href-or-on-click
<EuiButton
fullWidth
size="s"
href={visualizeInfo.href}
onClick={handleVisualizeLinkClick}
data-test-subj={`fieldVisualize-${field.name}`}
>
<FormattedMessage
id="discover.fieldChooser.visualizeButton.label"
defaultMessage="Visualize"
/>
</EuiButton>
);
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { DiscoverSidebarComponent as DiscoverSidebar } from './discover_sidebar'
import { ElasticSearchHit } from '../../../../doc_views/doc_views_types';
import { discoverServiceMock as mockDiscoverServices } from '../../../../../__mocks__/services';
import { stubLogstashIndexPattern } from '../../../../../../../data/common/stubs';
import { VIEW_MODE } from '../view_mode_toggle';

jest.mock('../../../../../kibana_services', () => ({
getServices: () => mockDiscoverServices,
Expand Down Expand Up @@ -65,6 +66,7 @@ function getCompProps(): DiscoverSidebarProps {
setFieldFilter: jest.fn(),
onEditRuntimeField: jest.fn(),
editField: jest.fn(),
viewMode: VIEW_MODE.DOCUMENT_LEVEL,
};
}

Expand Down
Loading