-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add queryFilter type and renames AnalyticsDataQuery and AnalyticsRequ…
…estQuery type
- Loading branch information
Showing
6 changed files
with
76 additions
and
35 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
bitmovin-analytics-datasource/src/components/ConfigEditor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { SelectableValue } from '@grafana/data'; | ||
import { QueryAdAttribute } from './queryAdAttributes'; | ||
import { QueryAttribute } from './queryAttributes'; | ||
|
||
export enum QUERY_FILTER_OPERATORS { | ||
GT = 'GT', | ||
GTE = 'GTE', | ||
LT = 'LT', | ||
LTE = 'LTE', | ||
EQ = 'EQ', | ||
NE = 'NE', | ||
CONTAINS = 'CONTAINS', | ||
NOTCONTAINS = 'NOTCONTAINS', | ||
IN = 'IN', | ||
} | ||
|
||
export type QueryFilterOperator = keyof typeof QUERY_FILTER_OPERATORS; | ||
|
||
export const SELECTABLE_QUERY_FILTER_OPERATORS: SelectableValue<QueryFilterOperator>[] = [ | ||
{ value: QUERY_FILTER_OPERATORS.GT, label: QUERY_FILTER_OPERATORS.GT }, | ||
{ value: QUERY_FILTER_OPERATORS.GTE, label: QUERY_FILTER_OPERATORS.GTE }, | ||
{ value: QUERY_FILTER_OPERATORS.LT, label: QUERY_FILTER_OPERATORS.LT }, | ||
{ value: QUERY_FILTER_OPERATORS.LTE, label: QUERY_FILTER_OPERATORS.LTE }, | ||
{ value: QUERY_FILTER_OPERATORS.EQ, label: QUERY_FILTER_OPERATORS.EQ }, | ||
{ value: QUERY_FILTER_OPERATORS.NE, label: QUERY_FILTER_OPERATORS.NE }, | ||
{ value: QUERY_FILTER_OPERATORS.CONTAINS, label: QUERY_FILTER_OPERATORS.CONTAINS }, | ||
{ value: QUERY_FILTER_OPERATORS.NOTCONTAINS, label: QUERY_FILTER_OPERATORS.NOTCONTAINS }, | ||
{ value: QUERY_FILTER_OPERATORS.IN, label: QUERY_FILTER_OPERATORS.IN }, | ||
]; | ||
|
||
export type QueryFilter = { | ||
name: QueryAdAttribute | QueryAttribute; | ||
operator: QueryFilterOperator; | ||
value: QueryFilterValue; | ||
}; | ||
|
||
export type QueryFilterValue = boolean | number | string | string[] | null; |