mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Infrastructure UI] Lens charts reload problem fix (#149517)
## Summary closes #149514 This PR fixes the problem with lens charts not always reloading when a search is submitted. ### How to test Go to Infrastructure > Hosts - Select a relative date range of 15m from now and click on submit - should always make all lens charts reload - Select any absolute date and click on submit- should always make all lens charts reload Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
de7eb48f91
commit
7facd3be50
3 changed files with 5 additions and 2 deletions
|
@ -46,7 +46,7 @@ export const getBreakdownColumn = (
|
|||
type: 'alphabetical',
|
||||
fallback: false,
|
||||
},
|
||||
orderDirection: 'desc',
|
||||
orderDirection: 'asc',
|
||||
otherBucket: false,
|
||||
missingBucket: false,
|
||||
parentFormat: {
|
||||
|
|
|
@ -79,7 +79,7 @@ describe('useHostTable hook', () => {
|
|||
fallback: false,
|
||||
type: 'alphabetical',
|
||||
},
|
||||
orderDirection: 'desc',
|
||||
orderDirection: 'asc',
|
||||
otherBucket: false,
|
||||
parentFormat: {
|
||||
id: 'terms',
|
||||
|
|
|
@ -19,6 +19,7 @@ import { useLensAttributes } from '../../../../../../hooks/use_lens_attributes';
|
|||
import { useMetricsDataViewContext } from '../../../hooks/use_data_view';
|
||||
import { useUnifiedSearchContext } from '../../../hooks/use_unified_search';
|
||||
import { HostLensAttributesTypes } from '../../../../../../common/visualizations';
|
||||
import { useHostsViewContext } from '../../../hooks/use_hosts_view';
|
||||
|
||||
export interface MetricChartProps {
|
||||
title: string;
|
||||
|
@ -37,6 +38,7 @@ export const MetricChart = ({ title, type, breakdownSize }: MetricChartProps) =>
|
|||
onSubmit,
|
||||
} = useUnifiedSearchContext();
|
||||
const { metricsDataView } = useMetricsDataViewContext();
|
||||
const { baseRequest } = useHostsViewContext();
|
||||
const {
|
||||
services: { lens },
|
||||
} = useKibana<InfraClientSetupDeps>();
|
||||
|
@ -111,6 +113,7 @@ export const MetricChart = ({ title, type, breakdownSize }: MetricChartProps) =>
|
|||
query={unifiedSearchQuery}
|
||||
filters={unifiedSearchFilters}
|
||||
extraActions={extraAction}
|
||||
lastReloadRequestTime={baseRequest.requestTs}
|
||||
executionContext={{
|
||||
type: 'infrastructure_observability_hosts_view',
|
||||
name: `Hosts View ${type} Chart`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue