mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Clears errors after running new query (#30367)
This commit is contained in:
parent
32c51215c4
commit
1cecc7f9b5
@ -312,7 +312,8 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
const isLoading = queryResponse.state === LoadingState.Loading;
|
const isLoading = queryResponse.state === LoadingState.Loading;
|
||||||
|
|
||||||
// gets an error without a refID, so non-query-row-related error, like a connection error
|
// gets an error without a refID, so non-query-row-related error, like a connection error
|
||||||
const queryErrors = queryResponse.error ? [queryResponse.error] : undefined;
|
const queryErrors =
|
||||||
|
queryResponse.state === LoadingState.Error && queryResponse.error ? [queryResponse.error] : undefined;
|
||||||
const queryError = getFirstNonQueryRowSpecificError(queryErrors);
|
const queryError = getFirstNonQueryRowSpecificError(queryErrors);
|
||||||
|
|
||||||
const showRichHistory = openDrawer === ExploreDrawer.RichHistory;
|
const showRichHistory = openDrawer === ExploreDrawer.RichHistory;
|
||||||
|
@ -37,9 +37,7 @@ exports[`Explore should render component 1`] = `
|
|||||||
richHistoryButtonActive={false}
|
richHistoryButtonActive={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ErrorContainer
|
<ErrorContainer />
|
||||||
queryError={Object {}}
|
|
||||||
/>
|
|
||||||
<AutoSizer
|
<AutoSizer
|
||||||
disableHeight={true}
|
disableHeight={true}
|
||||||
disableWidth={false}
|
disableWidth={false}
|
||||||
|
@ -657,7 +657,7 @@ export const processQueryResponse = (
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: false,
|
loading: loadingState === LoadingState.Loading || loadingState === LoadingState.Streaming,
|
||||||
queryResponse: response,
|
queryResponse: response,
|
||||||
graphResult: null,
|
graphResult: null,
|
||||||
tableResult: null,
|
tableResult: null,
|
||||||
|
Loading…
Reference in New Issue
Block a user