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:
Piotr Jamróz
2023-03-29 13:09:27 +02:00
committed by GitHub
parent 7bbe255150
commit 383148bcd1
3 changed files with 117 additions and 67 deletions

View File

@@ -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 */