[Metrics] Always display loading indicator when new data is loading (#48038) (#48176)

* [Metrics] Always display loading indicator when new data is loading

* Add loading data sources indicator to Metrics Explorer tab
This commit is contained in:
Zacqary Adam Xeper 2019-10-15 15:37:55 -05:00 committed by GitHub
parent 2e08f41705
commit 90788a90b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -38,13 +38,12 @@ export const MetricsExplorerCharts = ({
options,
chartOptions,
onRefetch,
onFilter,
source,
timeRange,
onTimeChange,
}: Props) => {
if (!data && loading) {
if (loading) {
return (
<InfraLoadingPanel
height={800}

View file

@ -11,6 +11,7 @@ import { StaticIndexPattern } from 'ui/index_patterns';
import { DocumentTitle } from '../../../components/document_title';
import { MetricsExplorerCharts } from '../../../components/metrics_explorer/charts';
import { MetricsExplorerToolbar } from '../../../components/metrics_explorer/toolbar';
import { SourceLoadingPage } from '../../../components/source_loading_page';
import { SourceQuery } from '../../../../common/graphql/types';
import { NoData } from '../../../components/empty_states';
import { useMetricsExplorerState } from './use_metric_explorer_state';
@ -23,7 +24,7 @@ interface MetricsExplorerPageProps {
export const MetricsExplorerPage = ({ source, derivedIndexPattern }: MetricsExplorerPageProps) => {
if (!source) {
return null;
return <SourceLoadingPage />;
}
const {