[Discover] Apply histogram layout of new table to classic table layout (#107766)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
04260d30a7
commit
87db81505d
|
@ -96,7 +96,6 @@ function getProps(timefield?: string) {
|
|||
}) as DataCharts$;
|
||||
|
||||
return {
|
||||
isLegacy: false,
|
||||
resetQuery: jest.fn(),
|
||||
savedSearch: savedSearchMock,
|
||||
savedSearchDataChart$: charts$,
|
||||
|
|
|
@ -21,7 +21,6 @@ import { DiscoverServices } from '../../../../../build_services';
|
|||
const TimechartHeaderMemoized = memo(TimechartHeader);
|
||||
const DiscoverHistogramMemoized = memo(DiscoverHistogram);
|
||||
export function DiscoverChart({
|
||||
isLegacy,
|
||||
resetQuery,
|
||||
savedSearch,
|
||||
savedSearchDataChart$,
|
||||
|
@ -31,7 +30,6 @@ export function DiscoverChart({
|
|||
stateContainer,
|
||||
timefield,
|
||||
}: {
|
||||
isLegacy: boolean;
|
||||
resetQuery: () => void;
|
||||
savedSearch: SavedSearch;
|
||||
savedSearchDataChart$: DataCharts$;
|
||||
|
@ -135,10 +133,7 @@ export function DiscoverChart({
|
|||
})}
|
||||
className="dscTimechart"
|
||||
>
|
||||
<div
|
||||
className={isLegacy ? 'dscHistogram' : 'dscHistogramGrid'}
|
||||
data-test-subj="discoverChart"
|
||||
>
|
||||
<div className="dscHistogram" data-test-subj="discoverChart">
|
||||
<DiscoverHistogramMemoized
|
||||
savedSearchData$={savedSearchDataChart$}
|
||||
timefilterUpdateHandler={timefilterUpdateHandler}
|
||||
|
|
|
@ -78,13 +78,6 @@ discover-app {
|
|||
}
|
||||
|
||||
.dscHistogram {
|
||||
display: flex;
|
||||
height: $euiSize * 12.5;
|
||||
padding: $euiSizeS;
|
||||
}
|
||||
|
||||
// new slimmer layout for data grid
|
||||
.dscHistogramGrid {
|
||||
display: flex;
|
||||
height: $euiSize * 8;
|
||||
padding: $euiSizeS $euiSizeS 0 $euiSizeS;
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
} from '../../../../../../../data/public';
|
||||
import { DiscoverSidebarResponsive } from '../sidebar';
|
||||
import { DiscoverLayoutProps } from './types';
|
||||
import { DOC_TABLE_LEGACY, SEARCH_FIELDS_FROM_SOURCE } from '../../../../../../common';
|
||||
import { SEARCH_FIELDS_FROM_SOURCE } from '../../../../../../common';
|
||||
import { popularizeField } from '../../../../helpers/popularize_field';
|
||||
import { DiscoverTopNav } from '../top_nav/discover_topnav';
|
||||
import { DocViewFilterFn, ElasticSearchHit } from '../../../../doc_views/doc_views_types';
|
||||
|
@ -88,7 +88,6 @@ export function DiscoverLayout({
|
|||
}, [indexPattern]);
|
||||
|
||||
const [isSidebarClosed, setIsSidebarClosed] = useState(false);
|
||||
const isLegacy = useMemo(() => uiSettings.get(DOC_TABLE_LEGACY), [uiSettings]);
|
||||
const useNewFieldsApi = useMemo(() => !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [uiSettings]);
|
||||
|
||||
const resultState = useMemo(
|
||||
|
@ -251,7 +250,6 @@ export function DiscoverLayout({
|
|||
>
|
||||
<EuiFlexItem grow={false}>
|
||||
<DiscoverChartMemoized
|
||||
isLegacy={isLegacy}
|
||||
state={state}
|
||||
resetQuery={resetQuery}
|
||||
savedSearch={savedSearch}
|
||||
|
|
Loading…
Reference in a new issue