mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Feat: Adds reconnect for failing datasource in Explore (#16226)
* Style: made outlined buttons and used it in Alert component * Refactor: clean up state on load data source failure * Refactor: test data source thunk created * Refactor: move logic to changeDatasource and call that from intialize * Refactor: move load explore datasources to own thunk * Refactor: move logic to updateDatasourceInstanceAction * Tests: reducer tests * Test(Explore): Added tests and made thunkTester async * Fix(Explore): Fixed so that we do not render StartPage if there is no StartPage * Fix(Explore): Missed type in merge * Refactor: Thunktester did not fail tests on async failures and prevented queires from running on datasource failures * Feat: Fadein error alert to prevent flickering * Feat: Refresh labels after reconnect * Refactor: Move useLokiForceLabels into useLokiLabels from PR comments * Feat: adds refresh metrics to Prometheus languageprovider * Style: removes padding for connected datasources * Chore: remove implicit anys
This commit is contained in:
@@ -54,8 +54,14 @@ export interface QueryEditorProps<DSType extends DataSourceApi, TQuery extends D
|
||||
onChange: (value: TQuery) => void;
|
||||
}
|
||||
|
||||
export enum DatasourceStatus {
|
||||
Connected,
|
||||
Disconnected,
|
||||
}
|
||||
|
||||
export interface ExploreQueryFieldProps<DSType extends DataSourceApi, TQuery extends DataQuery> {
|
||||
datasource: DSType;
|
||||
datasourceStatus: DatasourceStatus;
|
||||
query: TQuery;
|
||||
error?: string | JSX.Element;
|
||||
hint?: QueryHint;
|
||||
|
||||
Reference in New Issue
Block a user