mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
* Explore: prevent eplore from hiding errors containing refId * Update public/app/features/explore/ResponseErrorContainer.tsx Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com> Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
17 lines
585 B
TypeScript
17 lines
585 B
TypeScript
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
import { ExploreId, StoreState } from '../../types';
|
|
import { LoadingState } from '@grafana/data';
|
|
import { ErrorContainer } from './ErrorContainer';
|
|
|
|
interface Props {
|
|
exploreId: ExploreId;
|
|
}
|
|
export function ResponseErrorContainer(props: Props) {
|
|
const queryResponse = useSelector((state: StoreState) => state.explore[props.exploreId]?.queryResponse);
|
|
|
|
const queryError = queryResponse?.state === LoadingState.Error ? queryResponse?.error : undefined;
|
|
|
|
return <ErrorContainer queryError={queryError} />;
|
|
}
|