DataSourceAPI: Rename getApplicableFilters to getFiltersApplicability (#107775)
* refactor getApplicableFilters to getFiltersApplicability * add origin property as well * add comments
This commit is contained in:
@@ -660,6 +660,7 @@ export {
|
||||
type QueryFixAction,
|
||||
type QueryHint,
|
||||
type MetricFindValue,
|
||||
type FiltersApplicability,
|
||||
type DataSourceJsonData,
|
||||
type DataSourceSettings,
|
||||
type DataSourceInstanceSettings,
|
||||
|
||||
@@ -309,7 +309,7 @@ abstract class DataSourceApi<
|
||||
/**
|
||||
* Verify adhoc filters applicability based on queries and current filters
|
||||
*/
|
||||
getApplicableFilters?(options?: DataSourceGetTagKeysOptions<TQuery>): Promise<string[]>;
|
||||
getFiltersApplicability?(options?: DataSourceGetTagKeysOptions<TQuery>): Promise<FiltersApplicability[]>;
|
||||
|
||||
/**
|
||||
* Get tag keys for adhoc filters
|
||||
@@ -643,6 +643,16 @@ export interface MetricFindValue {
|
||||
expandable?: boolean;
|
||||
}
|
||||
|
||||
export interface FiltersApplicability {
|
||||
key: string;
|
||||
applicable: boolean;
|
||||
// message explaining why the filter is not applicable
|
||||
reason?: string;
|
||||
// needed to differentiate between filters with same key
|
||||
// but different origin
|
||||
origin?: string;
|
||||
}
|
||||
|
||||
export interface DataSourceJsonData {
|
||||
authType?: string;
|
||||
defaultRegion?: string;
|
||||
|
||||
Reference in New Issue
Block a user