mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource * Fix uid passing when provisioning * Better error handling and Uid column type change * Fix test and strict null error counts * Add backend tests * Add tests * Fix strict null checks * Update test * Improve tests * Update pkg/services/sqlstore/datasource.go Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com> * Variable rename Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -29,7 +29,9 @@ export interface DataLink {
|
||||
onClick?: (event: DataLinkClickEvent) => void;
|
||||
|
||||
// At the moment this is used for derived fields for metadata about internal linking.
|
||||
meta?: any;
|
||||
meta?: {
|
||||
datasourceUid?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type LinkTarget = '_blank' | '_self';
|
||||
|
||||
@@ -505,6 +505,7 @@ export interface DataSourceSettings<T extends DataSourceJsonData = DataSourceJso
|
||||
*/
|
||||
export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataSourceJsonData> {
|
||||
id: number;
|
||||
uid: string;
|
||||
type: string;
|
||||
name: string;
|
||||
meta: DataSourcePluginMeta;
|
||||
|
||||
@@ -7,7 +7,8 @@ export interface Props extends InputHTMLAttributes<HTMLInputElement> {
|
||||
label: string;
|
||||
tooltip?: PopoverContent;
|
||||
labelWidth?: number;
|
||||
inputWidth?: number;
|
||||
// If null no width will be specified not even default one
|
||||
inputWidth?: number | null;
|
||||
inputEl?: React.ReactNode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user