mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataSource: Allow data source plugins to set query default values (#49581)
* make it possible to set default query * set default query in cloudwatch ds * remove cloudwatch example code * apply feedback * Update public/app/features/explore/state/query.ts Co-authored-by: Giordano Ricci <me@giordanoricci.com> * Update public/app/features/query/components/QueryGroup.tsx Co-authored-by: Giordano Ricci <me@giordanoricci.com> * add alpha tag to method definiton Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
@@ -345,6 +345,12 @@ abstract class DataSourceApi<
|
||||
| StandardVariableSupport<DataSourceApi<TQuery, TOptions>>
|
||||
| CustomVariableSupport<DataSourceApi<TQuery, TOptions>>
|
||||
| DataSourceVariableSupport<DataSourceApi<TQuery, TOptions>>;
|
||||
|
||||
/*
|
||||
* Optionally, use this method to set default values for a query
|
||||
* @alpha -- experimental
|
||||
*/
|
||||
getDefaultQuery?(app: CoreApp): Partial<TQuery>;
|
||||
}
|
||||
|
||||
export interface MetadataInspectorProps<
|
||||
|
||||
Reference in New Issue
Block a user