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:
David
2019-10-29 10:37:36 +00:00
committed by GitHub
parent 49c44da73b
commit 781cff07af
23 changed files with 87 additions and 450 deletions

View File

@@ -2,7 +2,7 @@ import _ from 'lodash';
import React, { PureComponent } from 'react';
// Types
import { FormLabel, Select, Switch, QueryEditorProps, DataSourceStatus } from '@grafana/ui';
import { FormLabel, Select, Switch, QueryEditorProps } from '@grafana/ui';
import { SelectableValue } from '@grafana/data';
import { PrometheusDatasource } from '../datasource';
@@ -104,7 +104,6 @@ export class PromQueryEditor extends PureComponent<Props, State> {
onChange={this.onFieldChange}
history={[]}
data={data}
datasourceStatus={DataSourceStatus.Connected} // TODO: replace with real DataSourceStatus
/>
<div className="gf-form-inline">