mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Glue: Fix creating duplicated data links created by Correlations (#65490)
* Ensure correlations do not create duplicated data links * Remove correlation links before processing each correlation * Improve test coverage
This commit is contained in:
@@ -12,6 +12,15 @@ export interface DataLinkClickEvent<T = any> {
|
||||
e?: any; // mouse|react event
|
||||
}
|
||||
|
||||
/**
|
||||
* Data Links can be created by data source plugins or correlations.
|
||||
* Origin is set in DataLink object and indicates where the link was created.
|
||||
*/
|
||||
export enum DataLinkConfigOrigin {
|
||||
Datasource = 'Datasource',
|
||||
Correlations = 'Correlations',
|
||||
}
|
||||
|
||||
/**
|
||||
* Link configuration. The values may contain variables that need to be
|
||||
* processed before showing the link to user.
|
||||
@@ -39,6 +48,8 @@ export interface DataLink<T extends DataQuery = any> {
|
||||
// more custom onClick behaviour if needed.
|
||||
// @internal and subject to change in future releases
|
||||
internal?: InternalDataLink<T>;
|
||||
|
||||
origin?: DataLinkConfigOrigin;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
|
||||
Reference in New Issue
Block a user