mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 11:54:20 +08:00
Explore: Remove datasource testing on selector (#19910)
* Explore: Remove datasource testing on selector - datasource testing gets in the way of fast query iteration: switching between datasources can take seconds - it should not be explore's duty to test datasources in the first place - removed the concept of datasourceError in Explore, should not be its concern - datasource erorrs will express themselves in query errors just fine - connection errors are still bubbled up - removed reconnection logic from explore, should not be its concern - missing labels in loki are still "visible" via an empty label selector - Loki and Prometheus treated connection errors differently than other datasources, making sure to pass through the original error message * Show datasource error in query field for prom/loki/influx * Removed connection test case, fixed disabled state
This commit is contained in:
@ -3,7 +3,7 @@ import React, { memo } from 'react';
|
||||
|
||||
// Types
|
||||
import { AbsoluteTimeRange } from '@grafana/data';
|
||||
import { QueryEditorProps, DataSourceStatus } from '@grafana/ui';
|
||||
import { QueryEditorProps } from '@grafana/ui';
|
||||
import { LokiDatasource } from '../datasource';
|
||||
import { LokiQuery } from '../types';
|
||||
import { LokiQueryField } from './LokiQueryField';
|
||||
@ -30,8 +30,6 @@ export const LokiQueryEditor = memo(function LokiQueryEditor(props: Props) {
|
||||
|
||||
const { isSyntaxReady, setActiveOption, refreshLabels, ...syntaxProps } = useLokiSyntax(
|
||||
datasource.languageProvider,
|
||||
// TODO maybe use real status
|
||||
DataSourceStatus.Connected,
|
||||
absolute
|
||||
);
|
||||
|
||||
@ -39,7 +37,6 @@ export const LokiQueryEditor = memo(function LokiQueryEditor(props: Props) {
|
||||
<div>
|
||||
<LokiQueryField
|
||||
datasource={datasource}
|
||||
datasourceStatus={DataSourceStatus.Connected}
|
||||
query={query}
|
||||
onChange={onChange}
|
||||
onRunQuery={onRunQuery}
|
||||
|
Reference in New Issue
Block a user