Variables: Support static keys in AdHocFiltersVariable (#83157)
* initial start * don't use getTagKeysProvider * some cleanup * undo kinds adjustment * simplify * remove async declaration * add description and a couple of unit tests * add transformSaveModelToScene test * add tests for AdHocVariableForm * add tests for AdHocFiltersVariableEditor * update to defaultKeys * fix snapshots * update to 3.13.3
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { LoadingState } from './data';
|
||||
import { MetricFindValue } from './datasource';
|
||||
import { DataSourceRef } from './query';
|
||||
|
||||
export type VariableType = TypedVariableModel['type'];
|
||||
@@ -63,6 +64,10 @@ export interface AdHocVariableModel extends BaseVariableModel {
|
||||
* Filters that are always applied to the lookup of keys. Not shown in the AdhocFilterBuilder UI.
|
||||
*/
|
||||
baseFilters?: AdHocVariableFilter[];
|
||||
/**
|
||||
* Static keys that override any dynamic keys from the datasource.
|
||||
*/
|
||||
defaultKeys?: MetricFindValue[];
|
||||
}
|
||||
|
||||
export interface GroupByVariableModel extends VariableWithOptions {
|
||||
|
||||
@@ -195,6 +195,7 @@ export const Pages = {
|
||||
AdHocFiltersVariable: {
|
||||
datasourceSelect: Components.DataSourcePicker.inputV2,
|
||||
infoText: 'data-testid ad-hoc filters variable info text',
|
||||
modeToggle: 'data-testid ad-hoc filters variable mode toggle',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user