mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
QueryGroup & DataSourceSrv & DataSourcePicker changes simplify usage, error handling and reduce duplication, support for uid (#29542)
* Starting moving more stuff into data source picker * WIP progress * Progress on datasource picker rethink * Things are working now some details to figure out * Removed commented part * Complex work on getting data source lists * Fixed variable support showing correct data sources * Tried fixing dashboard import but failed * Fixes * Fixed import dashboard * Fixed unit test * Fixed explore test * Fixed test * Fix * fixed more tests * fixed more tests * fixed showing which option is default in picker * Changed query variable to use data source picker, updated tests and e2e * Fixed more tests * Updated snapshots, had wrong typescript version
This commit is contained in:
@@ -16,14 +16,9 @@ export interface DataSourceSrv {
|
||||
get(name?: string | null, scopedVars?: ScopedVars): Promise<DataSourceApi>;
|
||||
|
||||
/**
|
||||
* Get all data sources
|
||||
* Get a list of data sources
|
||||
*/
|
||||
getAll(): DataSourceInstanceSettings[];
|
||||
|
||||
/**
|
||||
* Get all data sources except for internal ones that usually should not be listed like mixed data source.
|
||||
*/
|
||||
getExternal(): DataSourceInstanceSettings[];
|
||||
getList(filters?: GetDataSourceListFilters): DataSourceInstanceSettings[];
|
||||
|
||||
/**
|
||||
* Get settings and plugin metadata by name or uid
|
||||
@@ -31,6 +26,17 @@ export interface DataSourceSrv {
|
||||
getInstanceSettings(nameOrUid: string | null | undefined): DataSourceInstanceSettings | undefined;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface GetDataSourceListFilters {
|
||||
mixed?: boolean;
|
||||
metrics?: boolean;
|
||||
tracing?: boolean;
|
||||
annotations?: boolean;
|
||||
dashboard?: boolean;
|
||||
variables?: boolean;
|
||||
pluginId?: string;
|
||||
}
|
||||
|
||||
let singletonInstance: DataSourceSrv;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user